aboutsummaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-13 13:25:47 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-13 13:25:47 -0800
commit98723c4ecdbe06f90c66f3abec27b792c3b38e34 (patch)
treec6ea2a1627e8f7109e3aa0589cd625ac0c740aa7 /src/target
parentd16968e24f5d9e436ae4e136cd27652c4c948203 (diff)
downloadriscv-openocd-98723c4ecdbe06f90c66f3abec27b792c3b38e34.zip
riscv-openocd-98723c4ecdbe06f90c66f3abec27b792c3b38e34.tar.gz
riscv-openocd-98723c4ecdbe06f90c66f3abec27b792c3b38e34.tar.bz2
command_context_t -> struct command_context
Remove misleading typedef and redundant suffix from struct command_context.
Diffstat (limited to 'src/target')
-rw-r--r--src/target/arm11.c4
-rw-r--r--src/target/arm11.h2
-rw-r--r--src/target/arm720t.c6
-rw-r--r--src/target/arm7_9_common.c2
-rw-r--r--src/target/arm7_9_common.h2
-rw-r--r--src/target/arm7tdmi.c2
-rw-r--r--src/target/arm7tdmi.h2
-rw-r--r--src/target/arm920t.c4
-rw-r--r--src/target/arm920t.h2
-rw-r--r--src/target/arm926ejs.c4
-rw-r--r--src/target/arm926ejs.h2
-rw-r--r--src/target/arm966e.c4
-rw-r--r--src/target/arm966e.h2
-rw-r--r--src/target/arm9tdmi.c4
-rw-r--r--src/target/arm9tdmi.h4
-rw-r--r--src/target/arm_adi_v5.c2
-rw-r--r--src/target/arm_adi_v5.h2
-rw-r--r--src/target/armv4_5.c2
-rw-r--r--src/target/armv4_5.h2
-rw-r--r--src/target/armv4_5_cache.c2
-rw-r--r--src/target/armv4_5_cache.h4
-rw-r--r--src/target/armv7a.c2
-rw-r--r--src/target/armv7a.h2
-rw-r--r--src/target/armv7m.c2
-rw-r--r--src/target/armv7m.h2
-rw-r--r--src/target/avrt.c8
-rw-r--r--src/target/cortex_a8.c4
-rw-r--r--src/target/cortex_m3.c6
-rw-r--r--src/target/etb.c2
-rw-r--r--src/target/etm.c8
-rw-r--r--src/target/etm.h4
-rw-r--r--src/target/etm_dummy.c2
-rw-r--r--src/target/feroceon.c2
-rw-r--r--src/target/mips32.c2
-rw-r--r--src/target/mips32.h2
-rw-r--r--src/target/mips_m4k.c8
-rw-r--r--src/target/oocd_trace.c4
-rw-r--r--src/target/target.c28
-rw-r--r--src/target/target.h12
-rw-r--r--src/target/target_request.c8
-rw-r--r--src/target/target_request.h6
-rw-r--r--src/target/target_type.h4
-rw-r--r--src/target/trace.c2
-rw-r--r--src/target/trace.h4
-rw-r--r--src/target/xscale.c8
45 files changed, 96 insertions, 96 deletions
diff --git a/src/target/arm11.c b/src/target/arm11.c
index 970ffa2..feaa17b 100644
--- a/src/target/arm11.c
+++ b/src/target/arm11.c
@@ -1801,7 +1801,7 @@ static int arm11_target_create(struct target *target, Jim_Interp *interp)
return ERROR_OK;
}
-static int arm11_init_target(struct command_context_s *cmd_ctx,
+static int arm11_init_target(struct command_context *cmd_ctx,
struct target *target)
{
/* Initialize anything we can set up without talking to the target */
@@ -2239,7 +2239,7 @@ struct target_type arm11_target = {
};
-int arm11_register_commands(struct command_context_s *cmd_ctx)
+int arm11_register_commands(struct command_context *cmd_ctx)
{
FNC_INFO;
diff --git a/src/target/arm11.h b/src/target/arm11.h
index ae6a93c..f890253 100644
--- a/src/target/arm11.h
+++ b/src/target/arm11.h
@@ -182,7 +182,7 @@ struct arm11_reg_state
struct target * target;
};
-int arm11_register_commands(struct command_context_s *cmd_ctx);
+int arm11_register_commands(struct command_context *cmd_ctx);
int arm11_read_etm(struct arm11_common * arm11, uint8_t address, uint32_t *value);
int arm11_write_etm(struct arm11_common * arm11, uint8_t address, uint32_t value);
diff --git a/src/target/arm720t.c b/src/target/arm720t.c
index ad4b12e..bdbc8dd 100644
--- a/src/target/arm720t.c
+++ b/src/target/arm720t.c
@@ -211,7 +211,7 @@ static void arm720t_pre_restore_context(struct target *target)
arm720t_write_cp15(target, 0xee060f10, arm720t->far_reg);
}
-static int arm720t_verify_pointer(struct command_context_s *cmd_ctx,
+static int arm720t_verify_pointer(struct command_context *cmd_ctx,
struct arm720t_common *arm720t)
{
if (arm720t->common_magic != ARM720T_COMMON_MAGIC) {
@@ -371,7 +371,7 @@ static int arm720t_soft_reset_halt(struct target *target)
return ERROR_OK;
}
-static int arm720t_init_target(struct command_context_s *cmd_ctx, struct target *target)
+static int arm720t_init_target(struct command_context *cmd_ctx, struct target *target)
{
return arm7tdmi_init_target(cmd_ctx, target);
}
@@ -490,7 +490,7 @@ static int arm720t_mcr(struct target *target, int cpnum, uint32_t op1, uint32_t
return arm720t_write_cp15(target, mrc_opcode(cpnum, op1, op2, CRn, CRm), value);
}
-static int arm720t_register_commands(struct command_context_s *cmd_ctx)
+static int arm720t_register_commands(struct command_context *cmd_ctx)
{
int retval;
command_t *arm720t_cmd;
diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c
index 2d3fe15..87a6434 100644
--- a/src/target/arm7_9_common.c
+++ b/src/target/arm7_9_common.c
@@ -3119,7 +3119,7 @@ int arm7_9_init_arch_info(struct target *target, struct arm7_9_common *arm7_9)
1, 1, target);
}
-int arm7_9_register_commands(struct command_context_s *cmd_ctx)
+int arm7_9_register_commands(struct command_context *cmd_ctx)
{
command_t *arm7_9_cmd;
diff --git a/src/target/arm7_9_common.h b/src/target/arm7_9_common.h
index 2c50b71..035c5fe 100644
--- a/src/target/arm7_9_common.h
+++ b/src/target/arm7_9_common.h
@@ -115,7 +115,7 @@ target_to_arm7_9(struct target *target)
armv4_5_common);
}
-int arm7_9_register_commands(struct command_context_s *cmd_ctx);
+int arm7_9_register_commands(struct command_context *cmd_ctx);
int arm7_9_poll(struct target *target);
diff --git a/src/target/arm7tdmi.c b/src/target/arm7tdmi.c
index c4cda7d..029dce1 100644
--- a/src/target/arm7tdmi.c
+++ b/src/target/arm7tdmi.c
@@ -684,7 +684,7 @@ int arm7tdmi_examine(struct target *target)
return ERROR_OK;
}
-int arm7tdmi_init_target(struct command_context_s *cmd_ctx, struct target *target)
+int arm7tdmi_init_target(struct command_context *cmd_ctx, struct target *target)
{
arm7tdmi_build_reg_cache(target);
diff --git a/src/target/arm7tdmi.h b/src/target/arm7tdmi.h
index 4a0a1ed..85b64be 100644
--- a/src/target/arm7tdmi.h
+++ b/src/target/arm7tdmi.h
@@ -34,7 +34,7 @@ struct arm7tdmi_common
};
int arm7tdmi_init_arch_info(struct target *target, struct arm7tdmi_common *arm7tdmi, struct jtag_tap *tap);
-int arm7tdmi_init_target(struct command_context_s *cmd_ctx, struct target *target);
+int arm7tdmi_init_target(struct command_context *cmd_ctx, struct target *target);
int arm7tdmi_examine(struct target *target);
#endif /* ARM7TDMI_H */
diff --git a/src/target/arm920t.c b/src/target/arm920t.c
index 577bf26..cd63d7b 100644
--- a/src/target/arm920t.c
+++ b/src/target/arm920t.c
@@ -415,7 +415,7 @@ void arm920t_pre_restore_context(struct target *target)
static const char arm920_not[] = "target is not an ARM920";
-static int arm920t_verify_pointer(struct command_context_s *cmd_ctx,
+static int arm920t_verify_pointer(struct command_context *cmd_ctx,
struct arm920t_common *arm920t)
{
if (arm920t->common_magic != ARM920T_COMMON_MAGIC) {
@@ -1348,7 +1348,7 @@ static int arm920t_mcr(struct target *target, int cpnum, uint32_t op1, uint32_t
}
/** Registers commands to access coprocessor, cache, and MMU resources. */
-int arm920t_register_commands(struct command_context_s *cmd_ctx)
+int arm920t_register_commands(struct command_context *cmd_ctx)
{
int retval;
command_t *arm920t_cmd;
diff --git a/src/target/arm920t.h b/src/target/arm920t.h
index 02f6da5..567c8de 100644
--- a/src/target/arm920t.h
+++ b/src/target/arm920t.h
@@ -71,6 +71,6 @@ void arm920t_disable_mmu_caches(struct target *target,
int mmu, int d_u_cache, int i_cache);
void arm920t_enable_mmu_caches(struct target *target,
int mmu, int d_u_cache, int i_cache);
-int arm920t_register_commands(struct command_context_s *cmd_ctx);
+int arm920t_register_commands(struct command_context *cmd_ctx);
#endif /* ARM920T_H */
diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c
index b2f246f..47a20cb 100644
--- a/src/target/arm926ejs.c
+++ b/src/target/arm926ejs.c
@@ -474,7 +474,7 @@ static void arm926ejs_pre_restore_context(struct target *target)
static const char arm926_not[] = "target is not an ARM926";
-static int arm926ejs_verify_pointer(struct command_context_s *cmd_ctx,
+static int arm926ejs_verify_pointer(struct command_context *cmd_ctx,
struct arm926ejs_common *arm926)
{
if (arm926->common_magic != ARM926EJS_COMMON_MAGIC) {
@@ -818,7 +818,7 @@ static int arm926ejs_mmu(struct target *target, int *enabled)
}
/** Registers commands to access coprocessor, cache, and debug resources. */
-int arm926ejs_register_commands(struct command_context_s *cmd_ctx)
+int arm926ejs_register_commands(struct command_context *cmd_ctx)
{
int retval;
command_t *arm926ejs_cmd;
diff --git a/src/target/arm926ejs.h b/src/target/arm926ejs.h
index e6c46dc..22081f4 100644
--- a/src/target/arm926ejs.h
+++ b/src/target/arm926ejs.h
@@ -48,7 +48,7 @@ target_to_arm926(struct target *target)
int arm926ejs_init_arch_info(struct target *target,
struct arm926ejs_common *arm926ejs, struct jtag_tap *tap);
-int arm926ejs_register_commands(struct command_context_s *cmd_ctx);
+int arm926ejs_register_commands(struct command_context *cmd_ctx);
int arm926ejs_arch_state(struct target *target);
int arm926ejs_write_memory(struct target *target,
uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer);
diff --git a/src/target/arm966e.c b/src/target/arm966e.c
index b1ae48c..6db7d79 100644
--- a/src/target/arm966e.c
+++ b/src/target/arm966e.c
@@ -57,7 +57,7 @@ static int arm966e_target_create(struct target *target, Jim_Interp *interp)
return arm966e_init_arch_info(target, arm966e, target->tap);
}
-static int arm966e_verify_pointer(struct command_context_s *cmd_ctx,
+static int arm966e_verify_pointer(struct command_context *cmd_ctx,
struct arm966e_common *arm966e)
{
if (arm966e->common_magic != ARM966E_COMMON_MAGIC) {
@@ -216,7 +216,7 @@ COMMAND_HANDLER(arm966e_handle_cp15_command)
}
/** Registers commands used to access coprocessor resources. */
-int arm966e_register_commands(struct command_context_s *cmd_ctx)
+int arm966e_register_commands(struct command_context *cmd_ctx)
{
int retval;
command_t *arm966e_cmd;
diff --git a/src/target/arm966e.h b/src/target/arm966e.h
index 74e1a03..b58f3a2 100644
--- a/src/target/arm966e.h
+++ b/src/target/arm966e.h
@@ -43,7 +43,7 @@ target_to_arm966(struct target *target)
int arm966e_init_arch_info(struct target *target,
struct arm966e_common *arm966e, struct jtag_tap *tap);
-int arm966e_register_commands(struct command_context_s *cmd_ctx);
+int arm966e_register_commands(struct command_context *cmd_ctx);
int arm966e_write_cp15(struct target *target, int reg_addr, uint32_t value);
#endif /* ARM966E_H */
diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c
index 5425582..b910447 100644
--- a/src/target/arm9tdmi.c
+++ b/src/target/arm9tdmi.c
@@ -779,7 +779,7 @@ int arm9tdmi_examine(struct target *target)
return ERROR_OK;
}
-int arm9tdmi_init_target(struct command_context_s *cmd_ctx,
+int arm9tdmi_init_target(struct command_context *cmd_ctx,
struct target *target)
{
arm9tdmi_build_reg_cache(target);
@@ -936,7 +936,7 @@ COMMAND_HANDLER(handle_arm9tdmi_catch_vectors_command)
return ERROR_OK;
}
-int arm9tdmi_register_commands(struct command_context_s *cmd_ctx)
+int arm9tdmi_register_commands(struct command_context *cmd_ctx)
{
int retval;
command_t *arm9tdmi_cmd;
diff --git a/src/target/arm9tdmi.h b/src/target/arm9tdmi.h
index 5165dc8..34a63ee 100644
--- a/src/target/arm9tdmi.h
+++ b/src/target/arm9tdmi.h
@@ -51,12 +51,12 @@ enum arm9tdmi_vector_bit
ARM9TDMI_FIQ_VECTOR = 0x80,
};
-int arm9tdmi_init_target(struct command_context_s *cmd_ctx,
+int arm9tdmi_init_target(struct command_context *cmd_ctx,
struct target *target);
int arm9tdmi_examine(struct target *target);
int arm9tdmi_init_arch_info(struct target *target,
struct arm9tdmi_common *arm9tdmi, struct jtag_tap *tap);
-int arm9tdmi_register_commands(struct command_context_s *cmd_ctx);
+int arm9tdmi_register_commands(struct command_context *cmd_ctx);
int arm9tdmi_clock_out(struct arm_jtag *jtag_info,
uint32_t instr, uint32_t out, uint32_t *in, int sysspeed);
diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c
index 751020f..958844b 100644
--- a/src/target/arm_adi_v5.c
+++ b/src/target/arm_adi_v5.c
@@ -1022,7 +1022,7 @@ is_dap_cid_ok(uint32_t cid3, uint32_t cid2, uint32_t cid1, uint32_t cid0)
&& ((cid1 & 0x0f) == 0) && cid0 == 0x0d;
}
-int dap_info_command(struct command_context_s *cmd_ctx, struct swjdp_common *swjdp, int apsel)
+int dap_info_command(struct command_context *cmd_ctx, struct swjdp_common *swjdp, int apsel)
{
uint32_t dbgbase,apid;
diff --git a/src/target/arm_adi_v5.h b/src/target/arm_adi_v5.h
index 486d29f..56b6206 100644
--- a/src/target/arm_adi_v5.h
+++ b/src/target/arm_adi_v5.h
@@ -156,7 +156,7 @@ int ahbap_debugport_init(struct swjdp_common *swjdp);
/* Commands for user dap access */
-int dap_info_command(struct command_context_s *cmd_ctx,
+int dap_info_command(struct command_context *cmd_ctx,
struct swjdp_common *swjdp, int apsel);
#define DAP_COMMAND_HANDLER(name) \
diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c
index 097e6e7..f7d5d16 100644
--- a/src/target/armv4_5.c
+++ b/src/target/armv4_5.c
@@ -462,7 +462,7 @@ usage:
return ERROR_OK;
}
-int armv4_5_register_commands(struct command_context_s *cmd_ctx)
+int armv4_5_register_commands(struct command_context *cmd_ctx)
{
command_t *armv4_5_cmd;
diff --git a/src/target/armv4_5.h b/src/target/armv4_5.h
index 472c2c1..14dfa99 100644
--- a/src/target/armv4_5.h
+++ b/src/target/armv4_5.h
@@ -179,7 +179,7 @@ int armv4_5_arch_state(struct target *target);
int armv4_5_get_gdb_reg_list(struct target *target,
struct reg **reg_list[], int *reg_list_size);
-int armv4_5_register_commands(struct command_context_s *cmd_ctx);
+int armv4_5_register_commands(struct command_context *cmd_ctx);
int armv4_5_init_arch_info(struct target *target, struct arm *armv4_5);
int armv4_5_run_algorithm(struct target *target,
diff --git a/src/target/armv4_5_cache.c b/src/target/armv4_5_cache.c
index 793979e..58fc0c1 100644
--- a/src/target/armv4_5_cache.c
+++ b/src/target/armv4_5_cache.c
@@ -87,7 +87,7 @@ int armv4_5_identify_cache(uint32_t cache_type_reg, struct armv4_5_cache_common
return ERROR_OK;
}
-int armv4_5_handle_cache_info_command(struct command_context_s *cmd_ctx, struct armv4_5_cache_common *armv4_5_cache)
+int armv4_5_handle_cache_info_command(struct command_context *cmd_ctx, struct armv4_5_cache_common *armv4_5_cache)
{
if (armv4_5_cache->ctype == -1)
{
diff --git a/src/target/armv4_5_cache.h b/src/target/armv4_5_cache.h
index 456a32d..1a82b67 100644
--- a/src/target/armv4_5_cache.h
+++ b/src/target/armv4_5_cache.h
@@ -22,7 +22,7 @@
#include "types.h"
-struct command_context_s;
+struct command_context;
struct armv4_5_cachesize
{
@@ -47,7 +47,7 @@ int armv4_5_identify_cache(uint32_t cache_type_reg,
int armv4_5_cache_state(uint32_t cp15_control_reg,
struct armv4_5_cache_common *cache);
-int armv4_5_handle_cache_info_command(struct command_context_s *cmd_ctx,
+int armv4_5_handle_cache_info_command(struct command_context *cmd_ctx,
struct armv4_5_cache_common *armv4_5_cache);
enum
diff --git a/src/target/armv7a.c b/src/target/armv7a.c
index 9227219..e40e8fd 100644
--- a/src/target/armv7a.c
+++ b/src/target/armv7a.c
@@ -361,7 +361,7 @@ usage:
return ERROR_OK;
}
-int armv7a_register_commands(struct command_context_s *cmd_ctx)
+int armv7a_register_commands(struct command_context *cmd_ctx)
{
command_t *arm_adi_v5_dap_cmd;
command_t *armv7a_cmd;
diff --git a/src/target/armv7a.h b/src/target/armv7a.h
index 1b4884c..5cdffd8 100644
--- a/src/target/armv7a.h
+++ b/src/target/armv7a.h
@@ -152,7 +152,7 @@ struct armv7a_core_reg
int armv7a_arch_state(struct target *target);
struct reg_cache *armv7a_build_reg_cache(struct target *target,
struct armv7a_common *armv7a_common);
-int armv7a_register_commands(struct command_context_s *cmd_ctx);
+int armv7a_register_commands(struct command_context *cmd_ctx);
int armv7a_init_arch_info(struct target *target, struct armv7a_common *armv7a);
/* map psr mode bits to linear number */
diff --git a/src/target/armv7m.c b/src/target/armv7m.c
index 9c2e95c..a740584 100644
--- a/src/target/armv7m.c
+++ b/src/target/armv7m.c
@@ -832,7 +832,7 @@ COMMAND_HANDLER(handle_dap_info_command)
}
/** Registers commands used to access DAP resources. */
-int armv7m_register_commands(struct command_context_s *cmd_ctx)
+int armv7m_register_commands(struct command_context *cmd_ctx)
{
command_t *arm_adi_v5_dap_cmd;
diff --git a/src/target/armv7m.h b/src/target/armv7m.h
index 7debd35..7f8190b 100644
--- a/src/target/armv7m.h
+++ b/src/target/armv7m.h
@@ -142,7 +142,7 @@ int armv7m_arch_state(struct target *target);
int armv7m_get_gdb_reg_list(struct target *target,
struct reg **reg_list[], int *reg_list_size);
-int armv7m_register_commands(struct command_context_s *cmd_ctx);
+int armv7m_register_commands(struct command_context *cmd_ctx);
int armv7m_init_arch_info(struct target *target, struct armv7m_common *armv7m);
int armv7m_run_algorithm(struct target *target,
diff --git a/src/target/avrt.c b/src/target/avrt.c
index 4371561..cabb272 100644
--- a/src/target/avrt.c
+++ b/src/target/avrt.c
@@ -29,11 +29,11 @@
#define AVR_JTAG_INS_LEN 4
/* cli handling */
-int avr_register_commands(struct command_context_s *cmd_ctx);
+int avr_register_commands(struct command_context *cmd_ctx);
/* forward declarations */
int avr_target_create(struct target *target, Jim_Interp *interp);
-int avr_init_target(struct command_context_s *cmd_ctx, struct target *target);
+int avr_init_target(struct command_context *cmd_ctx, struct target *target);
int avr_arch_state(struct target *target);
int avr_poll(struct target *target);
@@ -96,7 +96,7 @@ struct target_type avr_target =
.init_target = avr_init_target,
};
-int avr_register_commands(struct command_context_s *cmd_ctx)
+int avr_register_commands(struct command_context *cmd_ctx)
{
LOG_DEBUG("%s", __FUNCTION__);
return ERROR_OK;
@@ -112,7 +112,7 @@ int avr_target_create(struct target *target, Jim_Interp *interp)
return ERROR_OK;
}
-int avr_init_target(struct command_context_s *cmd_ctx, struct target *target)
+int avr_init_target(struct command_context *cmd_ctx, struct target *target)
{
LOG_DEBUG("%s", __FUNCTION__);
return ERROR_OK;
diff --git a/src/target/cortex_a8.c b/src/target/cortex_a8.c
index 586b9ea..6c61363 100644
--- a/src/target/cortex_a8.c
+++ b/src/target/cortex_a8.c
@@ -1443,7 +1443,7 @@ static void cortex_a8_build_reg_cache(struct target *target)
}
-static int cortex_a8_init_target(struct command_context_s *cmd_ctx,
+static int cortex_a8_init_target(struct command_context *cmd_ctx,
struct target *target)
{
cortex_a8_build_reg_cache(target);
@@ -1546,7 +1546,7 @@ COMMAND_HANDLER(cortex_a8_handle_dbginit_command)
}
-static int cortex_a8_register_commands(struct command_context_s *cmd_ctx)
+static int cortex_a8_register_commands(struct command_context *cmd_ctx)
{
command_t *cortex_a8_cmd;
int retval = ERROR_OK;
diff --git a/src/target/cortex_m3.c b/src/target/cortex_m3.c
index eea9c88..bb0b0c4 100644
--- a/src/target/cortex_m3.c
+++ b/src/target/cortex_m3.c
@@ -1435,7 +1435,7 @@ static int cortex_m3_bulk_write_memory(struct target *target, uint32_t address,
return cortex_m3_write_memory(target, address, 4, count, buffer);
}
-static int cortex_m3_init_target(struct command_context_s *cmd_ctx,
+static int cortex_m3_init_target(struct command_context *cmd_ctx,
struct target *target)
{
armv7m_build_reg_cache(target);
@@ -1759,7 +1759,7 @@ static int cortex_m3_target_create(struct target *target, Jim_Interp *interp)
/*--------------------------------------------------------------------------*/
-static int cortex_m3_verify_pointer(struct command_context_s *cmd_ctx,
+static int cortex_m3_verify_pointer(struct command_context *cmd_ctx,
struct cortex_m3_common *cm3)
{
if (cm3->common_magic != CORTEX_M3_COMMON_MAGIC) {
@@ -1928,7 +1928,7 @@ COMMAND_HANDLER(handle_cortex_m3_mask_interrupts_command)
return ERROR_OK;
}
-static int cortex_m3_register_commands(struct command_context_s *cmd_ctx)
+static int cortex_m3_register_commands(struct command_context *cmd_ctx)
{
int retval;
command_t *cortex_m3_cmd;
diff --git a/src/target/etb.c b/src/target/etb.c
index b698151..903951f 100644
--- a/src/target/etb.c
+++ b/src/target/etb.c
@@ -403,7 +403,7 @@ COMMAND_HANDLER(handle_etb_config_command)
return ERROR_OK;
}
-static int etb_register_commands(struct command_context_s *cmd_ctx)
+static int etb_register_commands(struct command_context *cmd_ctx)
{
command_t *etb_cmd = register_command(cmd_ctx, NULL, "etb",
NULL, COMMAND_ANY, "Embedded Trace Buffer");
diff --git a/src/target/etm.c b/src/target/etm.c
index cc92098..ee064eb 100644
--- a/src/target/etm.c
+++ b/src/target/etm.c
@@ -219,7 +219,7 @@ static int etm_reg_arch_type = -1;
static int etm_get_reg(struct reg *reg);
static int etm_read_reg_w_check(struct reg *reg,
uint8_t* check_value, uint8_t* check_mask);
-static int etm_register_user_commands(struct command_context_s *cmd_ctx);
+static int etm_register_user_commands(struct command_context *cmd_ctx);
static int etm_set_reg_w_exec(struct reg *reg, uint8_t *buf);
static int etm_write_reg(struct reg *reg, uint32_t value);
@@ -884,7 +884,7 @@ static int etmv1_data(struct etm_context *ctx, int size, uint32_t *data)
return 0;
}
-static int etmv1_analyze_trace(struct etm_context *ctx, struct command_context_s *cmd_ctx)
+static int etmv1_analyze_trace(struct etm_context *ctx, struct command_context *cmd_ctx)
{
int retval;
struct arm_instruction instruction;
@@ -2109,7 +2109,7 @@ COMMAND_HANDLER(handle_etm_analyze_command)
return retval;
}
-int etm_register_commands(struct command_context_s *cmd_ctx)
+int etm_register_commands(struct command_context *cmd_ctx)
{
etm_cmd = register_command(cmd_ctx, NULL, "etm", NULL, COMMAND_ANY, "Embedded Trace Macrocell");
@@ -2119,7 +2119,7 @@ int etm_register_commands(struct command_context_s *cmd_ctx)
return ERROR_OK;
}
-static int etm_register_user_commands(struct command_context_s *cmd_ctx)
+static int etm_register_user_commands(struct command_context *cmd_ctx)
{
register_command(cmd_ctx, etm_cmd, "tracemode", handle_etm_tracemode_command,
COMMAND_EXEC, "configure/display trace mode: "
diff --git a/src/target/etm.h b/src/target/etm.h
index 1ca9b93..b74c6d9 100644
--- a/src/target/etm.h
+++ b/src/target/etm.h
@@ -126,7 +126,7 @@ struct etm_context;
struct etm_capture_driver
{
char *name;
- int (*register_commands)(struct command_context_s *cmd_ctx);
+ int (*register_commands)(struct command_context *cmd_ctx);
int (*init)(struct etm_context *etm_ctx);
trace_status_t (*status)(struct etm_context *etm_ctx);
int (*read_trace)(struct etm_context *etm_ctx);
@@ -212,7 +212,7 @@ struct reg_cache* etm_build_reg_cache(struct target *target,
int etm_setup(struct target *target);
-int etm_register_commands(struct command_context_s *cmd_ctx);
+int etm_register_commands(struct command_context *cmd_ctx);
#define ERROR_ETM_INVALID_DRIVER (-1300)
#define ERROR_ETM_PORTMODE_NOT_SUPPORTED (-1301)
diff --git a/src/target/etm_dummy.c b/src/target/etm_dummy.c
index 598c799..8301fb0 100644
--- a/src/target/etm_dummy.c
+++ b/src/target/etm_dummy.c
@@ -58,7 +58,7 @@ COMMAND_HANDLER(handle_etm_dummy_config_command)
return ERROR_OK;
}
-static int etm_dummy_register_commands(struct command_context_s *cmd_ctx)
+static int etm_dummy_register_commands(struct command_context *cmd_ctx)
{
command_t *etm_dummy_cmd;
diff --git a/src/target/feroceon.c b/src/target/feroceon.c
index d64b53f..96a048a 100644
--- a/src/target/feroceon.c
+++ b/src/target/feroceon.c
@@ -577,7 +577,7 @@ int feroceon_bulk_write_memory(struct target *target, uint32_t address, uint32_t
return retval;
}
-int feroceon_init_target(struct command_context_s *cmd_ctx, struct target *target)
+int feroceon_init_target(struct command_context *cmd_ctx, struct target *target)
{
arm9tdmi_init_target(cmd_ctx, target);
return ERROR_OK;
diff --git a/src/target/mips32.c b/src/target/mips32.c
index c6ea66f..fe22dd5 100644
--- a/src/target/mips32.c
+++ b/src/target/mips32.c
@@ -331,7 +331,7 @@ int mips32_init_arch_info(struct target *target, struct mips32_common *mips32, s
return ERROR_OK;
}
-int mips32_register_commands(struct command_context_s *cmd_ctx)
+int mips32_register_commands(struct command_context *cmd_ctx)
{
return ERROR_OK;
}
diff --git a/src/target/mips32.h b/src/target/mips32.h
index b3e0bc4..7a4ba57 100644
--- a/src/target/mips32.h
+++ b/src/target/mips32.h
@@ -146,7 +146,7 @@ int mips32_enable_interrupts(struct target *target, int enable);
int mips32_examine(struct target *target);
-int mips32_register_commands(struct command_context_s *cmd_ctx);
+int mips32_register_commands(struct command_context *cmd_ctx);
int mips32_invalidate_core_regs(struct target *target);
int mips32_get_gdb_reg_list(struct target *target,
diff --git a/src/target/mips_m4k.c b/src/target/mips_m4k.c
index 94a7328..6dd00ad 100644
--- a/src/target/mips_m4k.c
+++ b/src/target/mips_m4k.c
@@ -39,8 +39,8 @@ int mips_m4k_resume(struct target *target, int current, uint32_t address, int ha
int mips_m4k_step(struct target *target, int current, uint32_t address, int handle_breakpoints);
int mips_m4k_read_memory(struct target *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer);
int mips_m4k_write_memory(struct target *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer);
-int mips_m4k_register_commands(struct command_context_s *cmd_ctx);
-int mips_m4k_init_target(struct command_context_s *cmd_ctx, struct target *target);
+int mips_m4k_register_commands(struct command_context *cmd_ctx);
+int mips_m4k_init_target(struct command_context *cmd_ctx, struct target *target);
int mips_m4k_target_create(struct target *target, Jim_Interp *interp);
int mips_m4k_examine(struct target *target);
@@ -902,7 +902,7 @@ int mips_m4k_write_memory(struct target *target, uint32_t address, uint32_t size
return mips32_dmaacc_write_mem(ejtag_info, address, size, count, (void *)buffer);
}
-int mips_m4k_register_commands(struct command_context_s *cmd_ctx)
+int mips_m4k_register_commands(struct command_context *cmd_ctx)
{
int retval;
@@ -910,7 +910,7 @@ int mips_m4k_register_commands(struct command_context_s *cmd_ctx)
return retval;
}
-int mips_m4k_init_target(struct command_context_s *cmd_ctx, struct target *target)
+int mips_m4k_init_target(struct command_context *cmd_ctx, struct target *target)
{
mips32_build_reg_cache(target);
diff --git a/src/target/oocd_trace.c b/src/target/oocd_trace.c
index 390c75d..c2e1361 100644
--- a/src/target/oocd_trace.c
+++ b/src/target/oocd_trace.c
@@ -30,7 +30,7 @@
*/
-static int oocd_trace_register_commands(struct command_context_s *cmd_ctx);
+static int oocd_trace_register_commands(struct command_context *cmd_ctx);
static int oocd_trace_read_reg(struct oocd_trace *oocd_trace, int reg, uint32_t *value)
{
@@ -407,7 +407,7 @@ COMMAND_HANDLER(handle_oocd_trace_resync_command)
return ERROR_OK;
}
-int oocd_trace_register_commands(struct command_context_s *cmd_ctx)
+int oocd_trace_register_commands(struct command_context *cmd_ctx)
{
command_t *oocd_trace_cmd;
diff --git a/src/target/target.c b/src/target/target.c
index ca440a7..85c228a 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -336,7 +336,7 @@ static struct target *get_target_by_num(int num)
return NULL;
}
-struct target* get_current_target(command_context_t *cmd_ctx)
+struct target* get_current_target(struct command_context *cmd_ctx)
{
struct target *target = get_target_by_num(cmd_ctx->current_target);
@@ -425,7 +425,7 @@ int target_resume(struct target *target, int current, uint32_t address, int hand
return retval;
}
-int target_process_reset(struct command_context_s *cmd_ctx, enum target_reset_mode reset_mode)
+int target_process_reset(struct command_context *cmd_ctx, enum target_reset_mode reset_mode)
{
char buf[100];
int retval;
@@ -754,7 +754,7 @@ err_write_phys_memory(struct target *target, uint32_t address,
return ERROR_FAIL;
}
-int target_init(struct command_context_s *cmd_ctx)
+int target_init(struct command_context *cmd_ctx)
{
struct target *target;
int retval;
@@ -2201,7 +2201,7 @@ COMMAND_HANDLER(handle_step_command)
return target->type->step(target, current_pc, addr, 1);
}
-static void handle_md_output(struct command_context_s *cmd_ctx,
+static void handle_md_output(struct command_context *cmd_ctx,
struct target *target, uint32_t address, unsigned size,
unsigned count, const uint8_t *buffer)
{
@@ -2709,7 +2709,7 @@ COMMAND_HANDLER(handle_test_image_command)
return CALL_COMMAND_HANDLER(handle_verify_image_command_internal, 0);
}
-static int handle_bp_command_list(struct command_context_s *cmd_ctx)
+static int handle_bp_command_list(struct command_context *cmd_ctx)
{
struct target *target = get_current_target(cmd_ctx);
struct breakpoint *breakpoint = target->breakpoints;
@@ -2737,7 +2737,7 @@ static int handle_bp_command_list(struct command_context_s *cmd_ctx)
return ERROR_OK;
}
-static int handle_bp_command_set(struct command_context_s *cmd_ctx,
+static int handle_bp_command_set(struct command_context *cmd_ctx,
uint32_t addr, uint32_t length, int hw)
{
struct target *target = get_current_target(cmd_ctx);
@@ -3132,7 +3132,7 @@ static int new_int_array_element(Jim_Interp * interp, const char *varname, int i
static int jim_mem2array(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
- command_context_t *context;
+ struct command_context *context;
struct target *target;
context = Jim_GetAssocData(interp, "context");
@@ -3321,7 +3321,7 @@ static int get_int_array_element(Jim_Interp * interp, const char *varname, int i
static int jim_array2mem(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
- command_context_t *context;
+ struct command_context *context;
struct target *target;
context = Jim_GetAssocData(interp, "context");
@@ -3822,7 +3822,7 @@ static int tcl_target_func(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
uint8_t target_buf[32];
Jim_Nvp *n;
struct target *target;
- struct command_context_s *cmd_ctx;
+ struct command_context *cmd_ctx;
int e;
enum {
@@ -4238,7 +4238,7 @@ static int target_create(Jim_GetOptInfo *goi)
int e;
int x;
struct target *target;
- struct command_context_s *cmd_ctx;
+ struct command_context *cmd_ctx;
cmd_ctx = Jim_GetAssocData(goi->interp, "context");
if (goi->argc < 3) {
@@ -4390,7 +4390,7 @@ static int jim_target(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
int x,r,e;
jim_wide w;
- struct command_context_s *cmd_ctx;
+ struct command_context *cmd_ctx;
struct target *target;
Jim_GetOptInfo goi;
enum tcmd {
@@ -4679,7 +4679,7 @@ COMMAND_HANDLER(handle_fast_load_command)
static int jim_mcrmrc(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
- command_context_t *context;
+ struct command_context *context;
struct target *target;
int retval;
@@ -4763,7 +4763,7 @@ static int jim_mcrmrc(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
return JIM_OK;
}
-int target_register_commands(struct command_context_s *cmd_ctx)
+int target_register_commands(struct command_context *cmd_ctx)
{
register_command(cmd_ctx, NULL, "targets",
@@ -4776,7 +4776,7 @@ int target_register_commands(struct command_context_s *cmd_ctx)
return ERROR_OK;
}
-int target_register_user_commands(struct command_context_s *cmd_ctx)
+int target_register_user_commands(struct command_context *cmd_ctx)
{
int retval = ERROR_OK;
if ((retval = target_request_register_commands(cmd_ctx)) != ERROR_OK)
diff --git a/src/target/target.h b/src/target/target.h
index 5f29e7f..914d62f 100644
--- a/src/target/target.h
+++ b/src/target/target.h
@@ -34,7 +34,7 @@
struct reg;
struct trace;
-struct command_context_s;
+struct command_context;
/**
@@ -241,12 +241,12 @@ struct target_timer_callback
struct target_timer_callback *next;
};
-int target_register_commands(struct command_context_s *cmd_ctx);
-int target_register_user_commands(struct command_context_s *cmd_ctx);
-int target_init(struct command_context_s *cmd_ctx);
+int target_register_commands(struct command_context *cmd_ctx);
+int target_register_user_commands(struct command_context *cmd_ctx);
+int target_init(struct command_context *cmd_ctx);
int target_examine(void);
int handle_target(void *priv);
-int target_process_reset(struct command_context_s *cmd_ctx,
+int target_process_reset(struct command_context *cmd_ctx,
enum target_reset_mode reset_mode);
int target_register_event_callback(
@@ -278,7 +278,7 @@ int target_call_timer_callbacks(void);
*/
int target_call_timer_callbacks_now(void);
-struct target* get_current_target(struct command_context_s *cmd_ctx);
+struct target* get_current_target(struct command_context *cmd_ctx);
struct target *get_target(const char *id);
/**
diff --git a/src/target/target_request.c b/src/target/target_request.c
index f1bb243..1f02be6 100644
--- a/src/target/target_request.c
+++ b/src/target/target_request.c
@@ -150,7 +150,7 @@ int target_request(struct target *target, uint32_t request)
return ERROR_OK;
}
-static int add_debug_msg_receiver(struct command_context_s *cmd_ctx, struct target *target)
+static int add_debug_msg_receiver(struct command_context *cmd_ctx, struct target *target)
{
struct debug_msg_receiver **p = &target->dbgmsg;
@@ -178,7 +178,7 @@ static int add_debug_msg_receiver(struct command_context_s *cmd_ctx, struct targ
return ERROR_OK;
}
-static struct debug_msg_receiver* find_debug_msg_receiver(struct command_context_s *cmd_ctx, struct target *target)
+static struct debug_msg_receiver* find_debug_msg_receiver(struct command_context *cmd_ctx, struct target *target)
{
int do_all_targets = 0;
struct debug_msg_receiver **p = &target->dbgmsg;
@@ -211,7 +211,7 @@ static struct debug_msg_receiver* find_debug_msg_receiver(struct command_context
return NULL;
}
-int delete_debug_msg_receiver(struct command_context_s *cmd_ctx, struct target *target)
+int delete_debug_msg_receiver(struct command_context *cmd_ctx, struct target *target)
{
struct debug_msg_receiver **p;
struct debug_msg_receiver *c;
@@ -299,7 +299,7 @@ COMMAND_HANDLER(handle_target_request_debugmsgs_command)
return ERROR_OK;
}
-int target_request_register_commands(struct command_context_s *cmd_ctx)
+int target_request_register_commands(struct command_context *cmd_ctx)
{
target_request_cmd =
register_command(cmd_ctx, NULL, "target_request", NULL, COMMAND_ANY, "target_request commands");
diff --git a/src/target/target_request.h b/src/target/target_request.h
index 1fa7e8b..cc9f3b9 100644
--- a/src/target/target_request.h
+++ b/src/target/target_request.h
@@ -38,13 +38,13 @@ typedef enum target_req_cmd
struct debug_msg_receiver
{
- command_context_t *cmd_ctx;
+ struct command_context *cmd_ctx;
struct debug_msg_receiver *next;
};
int target_request(struct target *target, uint32_t request);
-int delete_debug_msg_receiver(struct command_context_s *cmd_ctx,
+int delete_debug_msg_receiver(struct command_context *cmd_ctx,
struct target *target);
-int target_request_register_commands(struct command_context_s *cmd_ctx);
+int target_request_register_commands(struct command_context *cmd_ctx);
#endif /* TARGET_REQUEST_H */
diff --git a/src/target/target_type.h b/src/target/target_type.h
index 32c58ab..f601b19 100644
--- a/src/target/target_type.h
+++ b/src/target/target_type.h
@@ -151,7 +151,7 @@ struct target_type
*/
int (*run_algorithm)(struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_param, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info);
- int (*register_commands)(struct command_context_s *cmd_ctx);
+ int (*register_commands)(struct command_context *cmd_ctx);
/* called when target is created */
int (*target_create)(struct target *target, Jim_Interp *interp);
@@ -177,7 +177,7 @@ struct target_type
* It is illegal to talk to the target at this stage as this fn is invoked
* before the JTAG chain has been examined/verified
* */
- int (*init_target)(struct command_context_s *cmd_ctx, struct target *target);
+ int (*init_target)(struct command_context *cmd_ctx, struct target *target);
/* translate from virtual to physical address. Default implementation is successful
* no-op(i.e. virtual==physical).
diff --git a/src/target/trace.c b/src/target/trace.c
index bb57978..aa8fb29 100644
--- a/src/target/trace.c
+++ b/src/target/trace.c
@@ -156,7 +156,7 @@ COMMAND_HANDLER(handle_trace_history_command)
return ERROR_OK;
}
-int trace_register_commands(struct command_context_s *cmd_ctx)
+int trace_register_commands(struct command_context *cmd_ctx)
{
command_t *trace_cmd =
register_command(cmd_ctx, NULL, "trace", NULL, COMMAND_ANY, "trace commands");
diff --git a/src/target/trace.h b/src/target/trace.h
index 483f942..d6fd63e 100644
--- a/src/target/trace.h
+++ b/src/target/trace.h
@@ -23,7 +23,7 @@
#include "types.h"
struct target;
-struct command_context_s;
+struct command_context;
struct trace_point
{
@@ -52,7 +52,7 @@ typedef enum trace_status
} trace_status_t;
int trace_point(struct target *target, uint32_t number);
-int trace_register_commands(struct command_context_s *cmd_ctx);
+int trace_register_commands(struct command_context *cmd_ctx);
#define ERROR_TRACE_IMAGE_UNAVAILABLE -(1500)
#define ERROR_TRACE_INSTRUCTION_UNAVAILABLE -(1501)
diff --git a/src/target/xscale.c b/src/target/xscale.c
index ccf23b4..73c1ba1 100644
--- a/src/target/xscale.c
+++ b/src/target/xscale.c
@@ -146,7 +146,7 @@ static int xscale_set_reg_u32(struct reg *reg, uint32_t value)
static const char xscale_not[] = "target is not an XScale";
-static int xscale_verify_pointer(struct command_context_s *cmd_ctx,
+static int xscale_verify_pointer(struct command_context *cmd_ctx,
struct xscale_common *xscale)
{
if (xscale->common_magic != XSCALE_COMMON_MAGIC) {
@@ -2630,7 +2630,7 @@ static int xscale_branch_address(struct xscale_trace_data *trace_data,
return 0;
}
-static int xscale_analyze_trace(struct target *target, command_context_t *cmd_ctx)
+static int xscale_analyze_trace(struct target *target, struct command_context *cmd_ctx)
{
struct xscale_common *xscale = target_to_xscale(target);
int next_pc_ok = 0;
@@ -2860,7 +2860,7 @@ static void xscale_build_reg_cache(struct target *target)
xscale->reg_cache = (*cache_p);
}
-static int xscale_init_target(struct command_context_s *cmd_ctx,
+static int xscale_init_target(struct command_context *cmd_ctx,
struct target *target)
{
xscale_build_reg_cache(target);
@@ -3575,7 +3575,7 @@ COMMAND_HANDLER(xscale_handle_cp15)
return ERROR_OK;
}
-static int xscale_register_commands(struct command_context_s *cmd_ctx)
+static int xscale_register_commands(struct command_context *cmd_ctx)
{
command_t *xscale_cmd;