Remove misleading typedef and redundant suffix from struct reg_cache.
27 files changed:
{
struct arm11_common *arm11 = target->arch_info;
{
struct arm11_common *arm11 = target->arch_info;
- NEW(reg_cache_t, cache, 1);
+ NEW(struct reg_cache, cache, 1);
NEW(reg_t, reg_list, ARM11_REGCACHE_COUNT);
NEW(struct arm11_reg_state, arm11_reg_states, ARM11_REGCACHE_COUNT);
NEW(reg_t, reg_list, ARM11_REGCACHE_COUNT);
NEW(struct arm11_reg_state, arm11_reg_states, ARM11_REGCACHE_COUNT);
cache->reg_list = reg_list;
cache->num_regs = ARM11_REGCACHE_COUNT;
cache->reg_list = reg_list;
cache->num_regs = ARM11_REGCACHE_COUNT;
- reg_cache_t **cache_p = register_get_last_cache_p(&target->reg_cache);
+ struct reg_cache **cache_p = register_get_last_cache_p(&target->reg_cache);
(*cache_p) = cache;
arm11->core_cache = cache;
(*cache_p) = cache;
arm11->core_cache = cache;
size_t free_wrps; /**< keep track of breakpoints allocated by arm11_add_watchpoint() */
// GA
size_t free_wrps; /**< keep track of breakpoints allocated by arm11_add_watchpoint() */
// GA
- reg_cache_t *core_cache;
+ struct reg_cache *core_cache;
uint32_t common_magic;
struct arm_jtag jtag_info; /**< JTAG information for target */
uint32_t common_magic;
struct arm_jtag jtag_info; /**< JTAG information for target */
- reg_cache_t *eice_cache; /**< Embedded ICE register cache */
+ struct reg_cache *eice_cache; /**< Embedded ICE register cache */
uint32_t arm_bkpt; /**< ARM breakpoint instruction */
uint16_t thumb_bkpt; /**< Thumb breakpoint instruction */
uint32_t arm_bkpt; /**< ARM breakpoint instruction */
uint16_t thumb_bkpt; /**< Thumb breakpoint instruction */
static void arm7tdmi_build_reg_cache(target_t *target)
{
static void arm7tdmi_build_reg_cache(target_t *target)
{
- reg_cache_t **cache_p = register_get_last_cache_p(&target->reg_cache);
+ struct reg_cache **cache_p = register_get_last_cache_p(&target->reg_cache);
struct armv4_5_common_s *armv4_5 = target_to_armv4_5(target);
(*cache_p) = armv4_5_build_reg_cache(target, armv4_5);
struct armv4_5_common_s *armv4_5 = target_to_armv4_5(target);
(*cache_p) = armv4_5_build_reg_cache(target, armv4_5);
if (!target_was_examined(target))
{
/* get pointers to arch-specific information */
if (!target_was_examined(target))
{
/* get pointers to arch-specific information */
- reg_cache_t **cache_p = register_get_last_cache_p(&target->reg_cache);
- reg_cache_t *t = embeddedice_build_reg_cache(target, arm7_9);
+ struct reg_cache **cache_p = register_get_last_cache_p(&target->reg_cache);
+ struct reg_cache *t = embeddedice_build_reg_cache(target, arm7_9);
if (t == NULL)
return ERROR_FAIL;
if (t == NULL)
return ERROR_FAIL;
static void arm9tdmi_build_reg_cache(target_t *target)
{
static void arm9tdmi_build_reg_cache(target_t *target)
{
- reg_cache_t **cache_p = register_get_last_cache_p(&target->reg_cache);
+ struct reg_cache **cache_p = register_get_last_cache_p(&target->reg_cache);
struct armv4_5_common_s *armv4_5 = target_to_armv4_5(target);
(*cache_p) = armv4_5_build_reg_cache(target, armv4_5);
struct armv4_5_common_s *armv4_5 = target_to_armv4_5(target);
(*cache_p) = armv4_5_build_reg_cache(target, armv4_5);
if (!target_was_examined(target))
{
if (!target_was_examined(target))
{
- reg_cache_t **cache_p = register_get_last_cache_p(&target->reg_cache);
- reg_cache_t *t;
+ struct reg_cache **cache_p = register_get_last_cache_p(&target->reg_cache);
+ struct reg_cache *t;
/* one extra register (vector catch) */
t = embeddedice_build_reg_cache(target, arm7_9);
if (t == NULL)
/* one extra register (vector catch) */
t = embeddedice_build_reg_cache(target, arm7_9);
if (t == NULL)
-reg_cache_t* armv4_5_build_reg_cache(target_t *target, armv4_5_common_t *armv4_5_common)
+struct reg_cache* armv4_5_build_reg_cache(target_t *target, armv4_5_common_t *armv4_5_common)
- reg_cache_t *cache = malloc(sizeof(reg_cache_t));
+ struct reg_cache *cache = malloc(sizeof(struct reg_cache));
reg_t *reg_list = malloc(sizeof(reg_t) * num_regs);
struct armv4_5_core_reg *arch_info = malloc(sizeof(struct armv4_5_core_reg) * num_regs);
int i;
reg_t *reg_list = malloc(sizeof(reg_t) * num_regs);
struct armv4_5_core_reg *arch_info = malloc(sizeof(struct armv4_5_core_reg) * num_regs);
int i;
typedef struct arm
{
int common_magic;
typedef struct arm
{
int common_magic;
- reg_cache_t *core_cache;
+ struct reg_cache *core_cache;
int /* armv4_5_mode */ core_mode;
enum armv4_5_state core_state;
int /* armv4_5_mode */ core_mode;
enum armv4_5_state core_state;
armv4_5_common_t *armv4_5_common;
};
armv4_5_common_t *armv4_5_common;
};
-reg_cache_t* armv4_5_build_reg_cache(target_t *target,
+struct reg_cache* armv4_5_build_reg_cache(target_t *target,
armv4_5_common_t *armv4_5_common);
/* map psr mode bits to linear number */
armv4_5_common_t *armv4_5_common);
/* map psr mode bits to linear number */
struct armv7a_common
{
int common_magic;
struct armv7a_common
{
int common_magic;
- reg_cache_t *core_cache;
+ struct reg_cache *core_cache;
enum armv7a_mode core_mode;
enum armv7a_state core_state;
enum armv7a_mode core_mode;
enum armv7a_state core_state;
};
int armv7a_arch_state(struct target_s *target);
};
int armv7a_arch_state(struct target_s *target);
-reg_cache_t *armv7a_build_reg_cache(target_t *target,
+struct reg_cache *armv7a_build_reg_cache(target_t *target,
struct armv7a_common *armv7a_common);
int armv7a_register_commands(struct command_context_s *cmd_ctx);
int armv7a_init_arch_info(target_t *target, struct armv7a_common *armv7a);
struct armv7a_common *armv7a_common);
int armv7a_register_commands(struct command_context_s *cmd_ctx);
int armv7a_init_arch_info(target_t *target, struct armv7a_common *armv7a);
}
/** Builds cache of architecturally defined registers. */
}
/** Builds cache of architecturally defined registers. */
-reg_cache_t *armv7m_build_reg_cache(target_t *target)
+struct reg_cache *armv7m_build_reg_cache(target_t *target)
{
struct armv7m_common *armv7m = target_to_armv7m(target);
int num_regs = ARMV7M_NUM_REGS;
{
struct armv7m_common *armv7m = target_to_armv7m(target);
int num_regs = ARMV7M_NUM_REGS;
- reg_cache_t **cache_p = register_get_last_cache_p(&target->reg_cache);
- reg_cache_t *cache = malloc(sizeof(reg_cache_t));
+ struct reg_cache **cache_p = register_get_last_cache_p(&target->reg_cache);
+ struct reg_cache *cache = malloc(sizeof(struct reg_cache));
reg_t *reg_list = calloc(num_regs, sizeof(reg_t));
struct armv7m_core_reg *arch_info = calloc(num_regs, sizeof(struct armv7m_core_reg));
int i;
reg_t *reg_list = calloc(num_regs, sizeof(reg_t));
struct armv7m_core_reg *arch_info = calloc(num_regs, sizeof(struct armv7m_core_reg));
int i;
struct armv7m_common
{
int common_magic;
struct armv7m_common
{
int common_magic;
- reg_cache_t *core_cache;
+ struct reg_cache *core_cache;
enum armv7m_mode core_mode;
int exception_number;
struct swjdp_common swjdp_info;
enum armv7m_mode core_mode;
int exception_number;
struct swjdp_common swjdp_info;
struct armv7m_common *armv7m_common;
};
struct armv7m_common *armv7m_common;
};
-reg_cache_t *armv7m_build_reg_cache(target_t *target);
+struct reg_cache *armv7m_build_reg_cache(target_t *target);
enum armv7m_mode armv7m_number_to_mode(int number);
int armv7m_mode_to_number(enum armv7m_mode mode);
enum armv7m_mode armv7m_number_to_mode(int number);
int armv7m_mode_to_number(enum armv7m_mode mode);
static void cortex_a8_build_reg_cache(target_t *target)
{
static void cortex_a8_build_reg_cache(target_t *target)
{
- reg_cache_t **cache_p = register_get_last_cache_p(&target->reg_cache);
+ struct reg_cache **cache_p = register_get_last_cache_p(&target->reg_cache);
struct armv4_5_common_s *armv4_5 = target_to_armv4_5(target);
(*cache_p) = armv4_5_build_reg_cache(target, armv4_5);
struct armv4_5_common_s *armv4_5 = target_to_armv4_5(target);
(*cache_p) = armv4_5_build_reg_cache(target, armv4_5);
cortex_m3_dwt_setup(struct cortex_m3_common *cm3, struct target_s *target)
{
uint32_t dwtcr;
cortex_m3_dwt_setup(struct cortex_m3_common *cm3, struct target_s *target)
{
uint32_t dwtcr;
- struct reg_cache_s *cache;
+ struct reg_cache *cache;
cortex_m3_dwt_comparator_t *comparator;
int reg, i;
cortex_m3_dwt_comparator_t *comparator;
int reg, i;
int dwt_num_comp;
int dwt_comp_available;
cortex_m3_dwt_comparator_t *dwt_comparator_list;
int dwt_num_comp;
int dwt_comp_available;
cortex_m3_dwt_comparator_t *dwt_comparator_list;
- struct reg_cache_s *dwt_cache;
+ struct reg_cache *dwt_cache;
struct armv7m_common armv7m;
};
struct armv7m_common armv7m;
};
* Different versions of the modules have different capabilities, such as
* hardware support for vector_catch, single stepping, and monitor mode.
*/
* Different versions of the modules have different capabilities, such as
* hardware support for vector_catch, single stepping, and monitor mode.
*/
embeddedice_build_reg_cache(target_t *target, struct arm7_9_common *arm7_9)
{
int retval;
embeddedice_build_reg_cache(target_t *target, struct arm7_9_common *arm7_9)
{
int retval;
- reg_cache_t *reg_cache = malloc(sizeof(reg_cache_t));
+ struct reg_cache *reg_cache = malloc(sizeof(struct reg_cache));
reg_t *reg_list = NULL;
struct embeddedice_reg *arch_info = NULL;
struct arm_jtag *jtag_info = &arm7_9->jtag_info;
reg_t *reg_list = NULL;
struct embeddedice_reg *arch_info = NULL;
struct arm_jtag *jtag_info = &arm7_9->jtag_info;
struct arm_jtag *jtag_info;
};
struct arm_jtag *jtag_info;
};
-reg_cache_t* embeddedice_build_reg_cache(target_t *target,
+struct reg_cache* embeddedice_build_reg_cache(target_t *target,
struct arm7_9_common *arm7_9);
int embeddedice_setup(target_t *target);
struct arm7_9_common *arm7_9);
int embeddedice_setup(target_t *target);
-reg_cache_t* etb_build_reg_cache(etb_t *etb)
+struct reg_cache* etb_build_reg_cache(etb_t *etb)
- reg_cache_t *reg_cache = malloc(sizeof(reg_cache_t));
+ struct reg_cache *reg_cache = malloc(sizeof(struct reg_cache));
reg_t *reg_list = NULL;
struct etb_reg *arch_info = NULL;
int num_regs = 9;
reg_t *reg_list = NULL;
struct etb_reg *arch_info = NULL;
int num_regs = 9;
etm_context_t *etm_ctx;
struct jtag_tap *tap;
uint32_t cur_scan_chain;
etm_context_t *etm_ctx;
struct jtag_tap *tap;
uint32_t cur_scan_chain;
- reg_cache_t *reg_cache;
+ struct reg_cache *reg_cache;
/* ETB parameters */
uint32_t ram_depth;
/* ETB parameters */
uint32_t ram_depth;
extern struct etm_capture_driver etb_capture_driver;
extern struct etm_capture_driver etb_capture_driver;
-reg_cache_t* etb_build_reg_cache(etb_t *etb);
+struct reg_cache* etb_build_reg_cache(etb_t *etb);
*/
static reg_t *etm_reg_lookup(etm_context_t *etm_ctx, unsigned id)
{
*/
static reg_t *etm_reg_lookup(etm_context_t *etm_ctx, unsigned id)
{
- reg_cache_t *cache = etm_ctx->reg_cache;
+ struct reg_cache *cache = etm_ctx->reg_cache;
int i;
for (i = 0; i < cache->num_regs; i++) {
int i;
for (i = 0; i < cache->num_regs; i++) {
}
static void etm_reg_add(unsigned bcd_vers, struct arm_jtag *jtag_info,
}
static void etm_reg_add(unsigned bcd_vers, struct arm_jtag *jtag_info,
- reg_cache_t *cache, struct etm_reg *ereg,
+ struct reg_cache *cache, struct etm_reg *ereg,
const struct etm_reg_info *r, unsigned nreg)
{
reg_t *reg = cache->reg_list;
const struct etm_reg_info *r, unsigned nreg)
{
reg_t *reg = cache->reg_list;
-reg_cache_t *etm_build_reg_cache(target_t *target,
+struct reg_cache *etm_build_reg_cache(target_t *target,
struct arm_jtag *jtag_info, etm_context_t *etm_ctx)
{
struct arm_jtag *jtag_info, etm_context_t *etm_ctx)
{
- reg_cache_t *reg_cache = malloc(sizeof(reg_cache_t));
+ struct reg_cache *reg_cache = malloc(sizeof(struct reg_cache));
reg_t *reg_list = NULL;
struct etm_reg *arch_info = NULL;
unsigned bcd_vers, config;
reg_t *reg_list = NULL;
struct etm_reg *arch_info = NULL;
unsigned bcd_vers, config;
typedef struct etm
{
target_t *target; /* target this ETM is connected to */
typedef struct etm
{
target_t *target; /* target this ETM is connected to */
- reg_cache_t *reg_cache; /* ETM register cache */
+ struct reg_cache *reg_cache; /* ETM register cache */
struct etm_capture_driver *capture_driver; /* driver used to access ETM data */
void *capture_driver_priv; /* capture driver private data */
uint32_t trigger_percent; /* how much trace buffer to fill after trigger */
struct etm_capture_driver *capture_driver; /* driver used to access ETM data */
void *capture_driver_priv; /* capture driver private data */
uint32_t trigger_percent; /* how much trace buffer to fill after trigger */
BR_RSVD7 = 0x7, /* reserved */
} etmv1_branch_reason_t;
BR_RSVD7 = 0x7, /* reserved */
} etmv1_branch_reason_t;
-reg_cache_t* etm_build_reg_cache(target_t *target,
+struct reg_cache* etm_build_reg_cache(target_t *target,
struct arm_jtag *jtag_info, etm_context_t *etm_ctx);
int etm_setup(target_t *target);
struct arm_jtag *jtag_info, etm_context_t *etm_ctx);
int etm_setup(target_t *target);
-reg_cache_t *mips32_build_reg_cache(target_t *target)
+struct reg_cache *mips32_build_reg_cache(target_t *target)
{
/* get pointers to arch-specific information */
struct mips32_common *mips32 = target->arch_info;
int num_regs = MIPS32NUMCOREREGS;
{
/* get pointers to arch-specific information */
struct mips32_common *mips32 = target->arch_info;
int num_regs = MIPS32NUMCOREREGS;
- reg_cache_t **cache_p = register_get_last_cache_p(&target->reg_cache);
- reg_cache_t *cache = malloc(sizeof(reg_cache_t));
+ struct reg_cache **cache_p = register_get_last_cache_p(&target->reg_cache);
+ struct reg_cache *cache = malloc(sizeof(struct reg_cache));
reg_t *reg_list = malloc(sizeof(reg_t) * num_regs);
struct mips32_core_reg *arch_info = malloc(sizeof(struct mips32_core_reg) * num_regs);
int i;
reg_t *reg_list = malloc(sizeof(reg_t) * num_regs);
struct mips32_core_reg *arch_info = malloc(sizeof(struct mips32_core_reg) * num_regs);
int i;
{
uint32_t common_magic;
void *arch_info;
{
uint32_t common_magic;
void *arch_info;
- reg_cache_t *core_cache;
+ struct reg_cache *core_cache;
struct mips_ejtag ejtag_info;
uint32_t core_regs[MIPS32NUMCOREREGS];
struct mips_ejtag ejtag_info;
uint32_t core_regs[MIPS32NUMCOREREGS];
int mips32_restore_context(target_t *target);
int mips32_save_context(target_t *target);
int mips32_restore_context(target_t *target);
int mips32_save_context(target_t *target);
-reg_cache_t *mips32_build_reg_cache(target_t *target);
+struct reg_cache *mips32_build_reg_cache(target_t *target);
int mips32_run_algorithm(struct target_s *target,
int num_mem_params, struct mem_param *mem_params,
int mips32_run_algorithm(struct target_s *target,
int num_mem_params, struct mem_param *mem_params,
reg_arch_type_t *reg_arch_types = NULL;
reg_arch_type_t *reg_arch_types = NULL;
-reg_t* register_get_by_name(reg_cache_t *first,
+reg_t* register_get_by_name(struct reg_cache *first,
const char *name, bool search_all)
{
int i;
const char *name, bool search_all)
{
int i;
- reg_cache_t *cache = first;
+ struct reg_cache *cache = first;
-reg_cache_t** register_get_last_cache_p(reg_cache_t **first)
+struct reg_cache** register_get_last_cache_p(struct reg_cache **first)
- reg_cache_t **cache_p = first;
+ struct reg_cache **cache_p = first;
if (*cache_p)
while (*cache_p)
if (*cache_p)
while (*cache_p)
-typedef struct reg_cache_s
- struct reg_cache_s *next;
+ struct reg_cache *next;
reg_t *reg_list;
int num_regs;
reg_t *reg_list;
int num_regs;
typedef struct reg_arch_type_s
{
typedef struct reg_arch_type_s
{
struct reg_arch_type_s *next;
} reg_arch_type_t;
struct reg_arch_type_s *next;
} reg_arch_type_t;
-reg_t* register_get_by_name(reg_cache_t *first,
+reg_t* register_get_by_name(struct reg_cache *first,
const char *name, bool search_all);
const char *name, bool search_all);
-reg_cache_t** register_get_last_cache_p(reg_cache_t **first);
+struct reg_cache** register_get_last_cache_p(struct reg_cache **first);
int register_reg_arch_type(int (*get)(reg_t *reg),
int (*set)(reg_t *reg, uint8_t *buf));
int register_reg_arch_type(int (*get)(reg_t *reg),
int (*set)(reg_t *reg, uint8_t *buf));
/* list all available registers for the current target */
if (argc == 0)
{
/* list all available registers for the current target */
if (argc == 0)
{
- reg_cache_t *cache = target->reg_cache;
+ struct reg_cache *cache = target->reg_cache;
unsigned num;
COMMAND_PARSE_NUMBER(uint, args[0], num);
unsigned num;
COMMAND_PARSE_NUMBER(uint, args[0], num);
- reg_cache_t *cache = target->reg_cache;
+ struct reg_cache *cache = target->reg_cache;
count = 0;
while (cache)
{
count = 0;
while (cache)
{
enum target_endianess endianness; /* target endianess */
// also see: target_state_name()
enum target_state state; /* the current backend-state (running, halted, ...) */
enum target_endianess endianness; /* target endianess */
// also see: target_state_name()
enum target_state state; /* the current backend-state (running, halted, ...) */
- struct reg_cache_s *reg_cache; /* the first register cache of the target (core regs) */
+ struct reg_cache *reg_cache; /* the first register cache of the target (core regs) */
struct breakpoint_s *breakpoints; /* list of breakpoints */
struct watchpoint *watchpoints; /* list of watchpoints */
struct trace_s *trace_info; /* generic trace information */
struct breakpoint_s *breakpoints; /* list of breakpoints */
struct watchpoint *watchpoints; /* list of watchpoints */
struct trace_s *trace_info; /* generic trace information */
{
struct xscale_common_s *xscale = target_to_xscale(target);
struct armv4_5_common_s *armv4_5 = &xscale->armv4_5_common;
{
struct xscale_common_s *xscale = target_to_xscale(target);
struct armv4_5_common_s *armv4_5 = &xscale->armv4_5_common;
- reg_cache_t **cache_p = register_get_last_cache_p(&target->reg_cache);
+ struct reg_cache **cache_p = register_get_last_cache_p(&target->reg_cache);
xscale_reg_t *arch_info = malloc(sizeof(xscale_reg_arch_info));
int i;
int num_regs = sizeof(xscale_reg_arch_info) / sizeof(xscale_reg_t);
xscale_reg_t *arch_info = malloc(sizeof(xscale_reg_arch_info));
int i;
int num_regs = sizeof(xscale_reg_arch_info) / sizeof(xscale_reg_t);
if (xscale_reg_arch_type == -1)
xscale_reg_arch_type = register_reg_arch_type(xscale_get_reg, xscale_set_reg);
if (xscale_reg_arch_type == -1)
xscale_reg_arch_type = register_reg_arch_type(xscale_get_reg, xscale_set_reg);
- (*cache_p)->next = malloc(sizeof(reg_cache_t));
+ (*cache_p)->next = malloc(sizeof(struct reg_cache));
cache_p = &(*cache_p)->next;
/* fill in values for the xscale reg cache */
cache_p = &(*cache_p)->next;
/* fill in values for the xscale reg cache */
int common_magic;
/* XScale registers (CP15, DBG) */
int common_magic;
/* XScale registers (CP15, DBG) */
- reg_cache_t *reg_cache;
+ struct reg_cache *reg_cache;
/* current state of the debug handler */
uint32_t handler_address;
/* current state of the debug handler */
uint32_t handler_address;
Linking to existing account procedure
If you already have an account and want to add another login method
you
MUST first sign in with your existing account and
then change URL to read
https://review.openocd.org/login/?link
to get to this page again but this time it'll work for linking. Thank you.
SSH host keys fingerprints
1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=.. |
|+o.. . |
|*.o . . |
|+B . . . |
|Bo. = o S |
|Oo.+ + = |
|oB=.* = . o |
| =+=.+ + E |
|. .=o . o |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)