/* Look up register by ID ... most ETM instances only
* support a subset of the possible registers.
*/
-static reg_t *etm_reg_lookup(etm_context_t *etm_ctx, unsigned id)
+static reg_t *etm_reg_lookup(struct etm_context *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++) {
}
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;
}
}
-reg_cache_t *etm_build_reg_cache(target_t *target,
- struct arm_jtag *jtag_info, etm_context_t *etm_ctx)
+struct reg_cache *etm_build_reg_cache(target_t *target,
+ struct arm_jtag *jtag_info, struct etm_context *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;
/* the ETM might have an ETB connected */
if (strcmp(etm_ctx->capture_driver->name, "etb") == 0)
{
- etb_t *etb = etm_ctx->capture_driver_priv;
+ struct etb *etb = etm_ctx->capture_driver_priv;
if (!etb)
{
int retval;
uint32_t etm_ctrl_value;
struct arm *arm = target_to_arm(target);
- etm_context_t *etm_ctx = arm->etm;
+ struct etm_context *etm_ctx = arm->etm;
reg_t *etm_ctrl_reg;
etm_ctrl_reg = etm_reg_lookup(etm_ctx, ETM_CTRL);
NULL
};
-static int etm_read_instruction(etm_context_t *ctx, arm_instruction_t *instruction)
+static int etm_read_instruction(struct etm_context *ctx, struct arm_instruction *instruction)
{
int i;
int section = -1;
return ERROR_OK;
}
-static int etmv1_next_packet(etm_context_t *ctx, uint8_t *packet, int apo)
+static int etmv1_next_packet(struct etm_context *ctx, uint8_t *packet, int apo)
{
while (ctx->data_index < ctx->trace_depth)
{
return -1;
}
-static int etmv1_branch_address(etm_context_t *ctx)
+static int etmv1_branch_address(struct etm_context *ctx)
{
int retval;
uint8_t packet;
return 0;
}
-static int etmv1_data(etm_context_t *ctx, int size, uint32_t *data)
+static int etmv1_data(struct etm_context *ctx, int size, uint32_t *data)
{
int j;
uint8_t buf[4];
return 0;
}
-static int etmv1_analyze_trace(etm_context_t *ctx, struct command_context_s *cmd_ctx)
+static int etmv1_analyze_trace(struct etm_context *ctx, struct command_context_s *cmd_ctx)
{
int retval;
- arm_instruction_t instruction;
+ struct arm_instruction instruction;
/* read the trace data if it wasn't read already */
if (ctx->trace_depth == 0)
{
target_t *target = get_current_target(cmd_ctx);
struct arm *arm = target_to_arm(target);
- struct etm *etm;
+ struct etm_context *etm;
if (!is_arm(arm)) {
command_print(cmd_ctx, "ETM: current target isn't an ARM");
target_t *target;
struct arm *arm;
etm_portmode_t portmode = 0x0;
- struct etm *etm_ctx;
+ struct etm_context *etm_ctx;
int i;
if (argc != 5)
return ERROR_FAIL;
}
- etm_ctx = calloc(1, sizeof(etm_context_t));
+ etm_ctx = calloc(1, sizeof(struct etm_context));
if (!etm_ctx) {
LOG_DEBUG("out of memory");
return ERROR_FAIL;
{
target_t *target;
struct arm *arm;
- etm_context_t *etm;
+ struct etm_context *etm;
reg_t *etm_sys_config_reg;
int max_port_size;
uint32_t config;
{
target_t *target;
struct arm *arm;
- etm_context_t *etm;
+ struct etm_context *etm;
trace_status_t trace_status;
target = get_current_target(cmd_ctx);
{
target_t *target;
struct arm *arm;
- etm_context_t *etm_ctx;
+ struct etm_context *etm_ctx;
if (argc < 1)
{
command_print(cmd_ctx, "previously loaded image found and closed");
}
- etm_ctx->image = malloc(sizeof(image_t));
+ etm_ctx->image = malloc(sizeof(struct image));
etm_ctx->image->base_address_set = 0;
etm_ctx->image->start_address_set = 0;
struct fileio file;
target_t *target;
struct arm *arm;
- etm_context_t *etm_ctx;
+ struct etm_context *etm_ctx;
uint32_t i;
if (argc != 1)
struct fileio file;
target_t *target;
struct arm *arm;
- etm_context_t *etm_ctx;
+ struct etm_context *etm_ctx;
uint32_t i;
if (argc != 1)
fileio_read_u32(&file, &tmp); etm_ctx->tracemode = tmp;
fileio_read_u32(&file, &etm_ctx->trace_depth);
}
- etm_ctx->trace_data = malloc(sizeof(etmv1_trace_data_t) * etm_ctx->trace_depth);
+ etm_ctx->trace_data = malloc(sizeof(struct etmv1_trace_data) * etm_ctx->trace_depth);
if (etm_ctx->trace_data == NULL)
{
command_print(cmd_ctx, "not enough memory to perform operation");
{
target_t *target;
struct arm *arm;
- etm_context_t *etm_ctx;
+ struct etm_context *etm_ctx;
target = get_current_target(cmd_ctx);
arm = target_to_arm(target);
{
target_t *target;
struct arm *arm;
- etm_context_t *etm_ctx;
+ struct etm_context *etm_ctx;
reg_t *etm_ctrl_reg;
target = get_current_target(cmd_ctx);
{
target_t *target;
struct arm *arm;
- etm_context_t *etm_ctx;
+ struct etm_context *etm_ctx;
reg_t *etm_ctrl_reg;
target = get_current_target(cmd_ctx);
{
target_t *target;
struct arm *arm;
- etm_context_t *etm_ctx;
+ struct etm_context *etm_ctx;
int retval;
target = get_current_target(cmd_ctx);