From: Zachary T Welch Date: Fri, 13 Nov 2009 16:43:33 +0000 (-0800) Subject: mips32_core_reg_t -> struct mips32_core_reg X-Git-Tag: v0.4.0-rc1~657 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ccde06a08fbf9c4f57b321dbec0509f73239c2de;p=openocd mips32_core_reg_t -> struct mips32_core_reg Remove misleading typedef and redundant suffix from struct mips32_core_reg. --- diff --git a/src/target/mips32.c b/src/target/mips32.c index 6cec7f01..1804665d 100644 --- a/src/target/mips32.c +++ b/src/target/mips32.c @@ -38,7 +38,7 @@ char* mips32_core_reg_list[] = "status", "lo", "hi", "badvaddr", "cause", "pc" }; -mips32_core_reg_t mips32_core_reg_list_arch_info[MIPS32NUMCOREREGS] = +struct mips32_core_reg mips32_core_reg_list_arch_info[MIPS32NUMCOREREGS] = { {0, NULL, NULL}, {1, NULL, NULL}, @@ -98,7 +98,7 @@ int mips32_core_reg_arch_type = -1; int mips32_get_core_reg(reg_t *reg) { int retval; - mips32_core_reg_t *mips32_reg = reg->arch_info; + struct mips32_core_reg *mips32_reg = reg->arch_info; target_t *target = mips32_reg->target; struct mips32_common *mips32_target = target->arch_info; @@ -114,7 +114,7 @@ int mips32_get_core_reg(reg_t *reg) int mips32_set_core_reg(reg_t *reg, uint8_t *buf) { - mips32_core_reg_t *mips32_reg = reg->arch_info; + struct mips32_core_reg *mips32_reg = reg->arch_info; target_t *target = mips32_reg->target; uint32_t value = buf_get_u32(buf, 0, 32); @@ -133,7 +133,7 @@ int mips32_set_core_reg(reg_t *reg, uint8_t *buf) int mips32_read_core_reg(struct target_s *target, int num) { uint32_t reg_value; - mips32_core_reg_t *mips_core_reg; + struct mips32_core_reg *mips_core_reg; /* get pointers to arch-specific information */ struct mips32_common *mips32 = target->arch_info; @@ -153,7 +153,7 @@ int mips32_read_core_reg(struct target_s *target, int num) int mips32_write_core_reg(struct target_s *target, int num) { uint32_t reg_value; - mips32_core_reg_t *mips_core_reg; + struct mips32_core_reg *mips_core_reg; /* get pointers to arch-specific information */ struct mips32_common *mips32 = target->arch_info; @@ -280,7 +280,7 @@ reg_cache_t *mips32_build_reg_cache(target_t *target) reg_cache_t **cache_p = register_get_last_cache_p(&target->reg_cache); reg_cache_t *cache = malloc(sizeof(reg_cache_t)); reg_t *reg_list = malloc(sizeof(reg_t) * num_regs); - mips32_core_reg_t *arch_info = malloc(sizeof(mips32_core_reg_t) * num_regs); + struct mips32_core_reg *arch_info = malloc(sizeof(struct mips32_core_reg) * num_regs); int i; if (mips32_core_reg_arch_type == -1) diff --git a/src/target/mips32.h b/src/target/mips32.h index 870ff487..9fdb6053 100644 --- a/src/target/mips32.h +++ b/src/target/mips32.h @@ -66,12 +66,12 @@ struct mips32_common int (*write_core_reg)(struct target_s *target, int num); }; -typedef struct mips32_core_reg_s +struct mips32_core_reg { uint32_t num; struct target_s *target; struct mips32_common *mips32_common; -} mips32_core_reg_t; +}; #define MIPS32_OP_BEQ 0x04 #define MIPS32_OP_BNE 0x05