Commit 8c1ec4f0 authored by zwelch's avatar zwelch
Browse files

Add static keywords to core target source file data and functions.

git-svn-id: svn://svn.berlios.de/openocd/trunk@1579 b42882b7-edfa-0310-969c-e2dbd0fdcd60
parent d70dac5e
......@@ -30,13 +30,13 @@
#include "breakpoints.h"
char *breakpoint_type_strings[] =
static char *breakpoint_type_strings[] =
{
"hardware",
"software"
};
char *watchpoint_rw_strings[] =
static char *watchpoint_rw_strings[] =
{
"read",
"write",
......
......@@ -30,15 +30,11 @@ enum breakpoint_type
BKPT_SOFT,
};
extern char *breakpoint_type_strings[];
enum watchpoint_rw
{
WPT_READ = 0, WPT_WRITE = 1, WPT_ACCESS = 2
};
extern char *watchpoint_rw_strings[];
typedef struct breakpoint_s
{
u32 address;
......
......@@ -42,15 +42,17 @@
#include <stdlib.h>
bitfield_desc_t embeddedice_comms_ctrl_bitfield_desc[] =
#if 0
static bitfield_desc_t embeddedice_comms_ctrl_bitfield_desc[] =
{
{"R", 1},
{"W", 1},
{"reserved", 26},
{"version", 4}
};
#endif
int embeddedice_reg_arch_info[] =
static int embeddedice_reg_arch_info[] =
{
0x0, 0x1, 0x4, 0x5,
0x8, 0x9, 0xa, 0xb, 0xc, 0xd,
......@@ -58,7 +60,7 @@ int embeddedice_reg_arch_info[] =
0x2
};
char* embeddedice_reg_list[] =
static char* embeddedice_reg_list[] =
{
"debug_ctrl",
"debug_status",
......@@ -83,9 +85,9 @@ char* embeddedice_reg_list[] =
"vector catch"
};
int embeddedice_reg_arch_type = -1;
static int embeddedice_reg_arch_type = -1;
int embeddedice_get_reg(reg_t *reg);
static int embeddedice_get_reg(reg_t *reg);
reg_cache_t* embeddedice_build_reg_cache(target_t *target, arm7_9_common_t *arm7_9)
{
......@@ -215,7 +217,7 @@ int embeddedice_setup(target_t *target)
return jtag_execute_queue();
}
int embeddedice_get_reg(reg_t *reg)
static int embeddedice_get_reg(reg_t *reg)
{
int retval;
if ((retval = embeddedice_read_reg(reg)) != ERROR_OK)
......
......@@ -111,9 +111,9 @@ extern int embeddedice_handshake(arm_jtag_t *jtag_info, int hsbit, u32 timeout);
/* If many embeddedice_write_reg() follow eachother, then the >1 invocations can be this faster version of
* embeddedice_write_reg
*/
static const int embeddedice_num_bits[]={32,5,1};
static __inline__ void embeddedice_write_reg_inner( jtag_tap_t *tap, int reg_addr, u32 value)
{
static const int embeddedice_num_bits[]={32,5,1};
u32 values[3];
values[0]=value;
......
......@@ -36,7 +36,7 @@
#include <stdlib.h>
char* etb_reg_list[] =
static char* etb_reg_list[] =
{
"ETB_identification",
"ETB_ram_depth",
......@@ -49,13 +49,13 @@ char* etb_reg_list[] =
"ETB_control",
};
int etb_reg_arch_type = -1;
static int etb_reg_arch_type = -1;
int etb_get_reg(reg_t *reg);
static int etb_get_reg(reg_t *reg);
int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
static int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
int etb_set_instr(etb_t *etb, u32 new_instr)
static int etb_set_instr(etb_t *etb, u32 new_instr)
{
jtag_tap_t *tap;
tap = etb->tap;
......@@ -85,7 +85,7 @@ int etb_set_instr(etb_t *etb, u32 new_instr)
return ERROR_OK;
}
int etb_scann(etb_t *etb, u32 new_scan_chain)
static int etb_scann(etb_t *etb, u32 new_scan_chain)
{
if(etb->cur_scan_chain != new_scan_chain)
{
......@@ -156,7 +156,7 @@ reg_cache_t* etb_build_reg_cache(etb_t *etb)
return reg_cache;
}
int etb_get_reg(reg_t *reg)
static int etb_get_reg(reg_t *reg)
{
int retval;
if ((retval = etb_read_reg(reg)) != ERROR_OK)
......@@ -174,7 +174,7 @@ int etb_get_reg(reg_t *reg)
return ERROR_OK;
}
int etb_read_ram(etb_t *etb, u32 *data, int num_frames)
static int etb_read_ram(etb_t *etb, u32 *data, int num_frames)
{
scan_field_t fields[3];
int i;
......@@ -397,7 +397,7 @@ int etb_store_reg(reg_t *reg)
return etb_write_reg(reg, buf_get_u32(reg->value, 0, reg->size));
}
int etb_register_commands(struct command_context_s *cmd_ctx)
static int etb_register_commands(struct command_context_s *cmd_ctx)
{
command_t *etb_cmd;
......@@ -408,7 +408,7 @@ int etb_register_commands(struct command_context_s *cmd_ctx)
return ERROR_OK;
}
int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
static int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
jtag_tap_t *tap;
......@@ -462,7 +462,7 @@ int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cmd, char
return ERROR_OK;
}
int etb_init(etm_context_t *etm_ctx)
static int etb_init(etm_context_t *etm_ctx)
{
etb_t *etb = etm_ctx->capture_driver_priv;
......@@ -479,7 +479,7 @@ int etb_init(etm_context_t *etm_ctx)
return ERROR_OK;
}
trace_status_t etb_status(etm_context_t *etm_ctx)
static trace_status_t etb_status(etm_context_t *etm_ctx)
{
etb_t *etb = etm_ctx->capture_driver_priv;
......@@ -534,7 +534,7 @@ trace_status_t etb_status(etm_context_t *etm_ctx)
return etm_ctx->capture_status;
}
int etb_read_trace(etm_context_t *etm_ctx)
static int etb_read_trace(etm_context_t *etm_ctx)
{
etb_t *etb = etm_ctx->capture_driver_priv;
int first_frame = 0;
......@@ -684,7 +684,7 @@ int etb_read_trace(etm_context_t *etm_ctx)
return ERROR_OK;
}
int etb_start_capture(etm_context_t *etm_ctx)
static int etb_start_capture(etm_context_t *etm_ctx)
{
etb_t *etb = etm_ctx->capture_driver_priv;
u32 etb_ctrl_value = 0x1;
......@@ -716,7 +716,7 @@ int etb_start_capture(etm_context_t *etm_ctx)
return ERROR_OK;
}
int etb_stop_capture(etm_context_t *etm_ctx)
static int etb_stop_capture(etm_context_t *etm_ctx)
{
etb_t *etb = etm_ctx->capture_driver_priv;
reg_t *etb_ctrl_reg = &etb->reg_cache->reg_list[ETB_CTRL];
......
......@@ -70,6 +70,4 @@ extern int etb_store_reg(reg_t *reg);
extern int etb_set_reg(reg_t *reg, u32 value);
extern int etb_set_reg_w_exec(reg_t *reg, u8 *buf);
extern int etb_register_commands(struct command_context_s *cmd_ctx);
#endif /* ETB_H */
......@@ -46,15 +46,17 @@
*
*/
bitfield_desc_t etm_comms_ctrl_bitfield_desc[] =
#if 0
static bitfield_desc_t etm_comms_ctrl_bitfield_desc[] =
{
{"R", 1},
{"W", 1},
{"reserved", 26},
{"version", 4}
};
#endif
int etm_reg_arch_info[] =
static int etm_reg_arch_info[] =
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
......@@ -72,7 +74,7 @@ int etm_reg_arch_info[] =
0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
};
int etm_reg_arch_size_info[] =
static int etm_reg_arch_size_info[] =
{
32, 32, 17, 8, 3, 9, 32, 16,
17, 26, 25, 8, 17, 32, 32, 17,
......@@ -90,7 +92,7 @@ int etm_reg_arch_size_info[] =
17, 17, 17, 17, 32, 32, 32, 32
};
char* etm_reg_list[] =
static char* etm_reg_list[] =
{
"ETM_CTRL",
"ETM_CONFIG",
......@@ -205,11 +207,11 @@ char* etm_reg_list[] =
"ETM_CONTEXTID_COMPARATOR_MASK"
};
int etm_reg_arch_type = -1;
static int etm_reg_arch_type = -1;
int etm_get_reg(reg_t *reg);
static int etm_get_reg(reg_t *reg);
command_t *etm_cmd = NULL;
static command_t *etm_cmd = NULL;
reg_cache_t* etm_build_reg_cache(target_t *target, arm_jtag_t *jtag_info, etm_context_t *etm_ctx)
{
......@@ -480,7 +482,7 @@ extern etm_capture_driver_t etm_dummy_capture_driver;
extern etm_capture_driver_t oocd_trace_capture_driver;
#endif
etm_capture_driver_t *etm_capture_drivers[] =
static etm_capture_driver_t *etm_capture_drivers[] =
{
&etb_capture_driver,
&etm_dummy_capture_driver,
......@@ -502,7 +504,7 @@ char *etmv1v1_branch_reason_strings[] =
"reserved",
};
int etm_read_instruction(etm_context_t *ctx, arm_instruction_t *instruction)
static int etm_read_instruction(etm_context_t *ctx, arm_instruction_t *instruction)
{
int i;
int section = -1;
......@@ -570,7 +572,7 @@ int etm_read_instruction(etm_context_t *ctx, arm_instruction_t *instruction)
return ERROR_OK;
}
int etmv1_next_packet(etm_context_t *ctx, u8 *packet, int apo)
static int etmv1_next_packet(etm_context_t *ctx, u8 *packet, int apo)
{
while (ctx->data_index < ctx->trace_depth)
{
......@@ -635,7 +637,7 @@ int etmv1_next_packet(etm_context_t *ctx, u8 *packet, int apo)
return -1;
}
int etmv1_branch_address(etm_context_t *ctx)
static int etmv1_branch_address(etm_context_t *ctx)
{
int retval;
u8 packet;
......@@ -721,7 +723,7 @@ int etmv1_branch_address(etm_context_t *ctx)
return 0;
}
int etmv1_data(etm_context_t *ctx, int size, u32 *data)
static int etmv1_data(etm_context_t *ctx, int size, u32 *data)
{
int j;
u8 buf[4];
......@@ -750,7 +752,7 @@ int etmv1_data(etm_context_t *ctx, int size, u32 *data)
return 0;
}
int etmv1_analyze_trace(etm_context_t *ctx, struct command_context_s *cmd_ctx)
static int etmv1_analyze_trace(etm_context_t *ctx, struct command_context_s *cmd_ctx)
{
int retval;
arm_instruction_t instruction;
......@@ -1043,7 +1045,7 @@ int etmv1_analyze_trace(etm_context_t *ctx, struct command_context_s *cmd_ctx)
return ERROR_OK;
}
int handle_etm_tracemode_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
static int handle_etm_tracemode_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
......@@ -1223,7 +1225,7 @@ int handle_etm_tracemode_command(struct command_context_s *cmd_ctx, char *cmd, c
return ERROR_OK;
}
int handle_etm_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
static int handle_etm_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
......@@ -1423,7 +1425,7 @@ int handle_etm_info_command(struct command_context_s *cmd_ctx, char *cmd, char *
return ERROR_OK;
}
int handle_etm_status_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
static int handle_etm_status_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
......@@ -1471,7 +1473,7 @@ int handle_etm_status_command(struct command_context_s *cmd_ctx, char *cmd, char
return ERROR_OK;
}
int handle_etm_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
static int handle_etm_image_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
......@@ -1530,7 +1532,7 @@ int handle_etm_image_command(struct command_context_s *cmd_ctx, char *cmd, char
return ERROR_OK;
}
int handle_etm_dump_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
static int handle_etm_dump_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
fileio_t file;
target_t *target;
......@@ -1598,7 +1600,7 @@ int handle_etm_dump_command(struct command_context_s *cmd_ctx, char *cmd, char *
return ERROR_OK;
}
int handle_etm_load_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
static int handle_etm_load_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
fileio_t file;
target_t *target;
......@@ -1680,7 +1682,7 @@ int handle_etm_load_command(struct command_context_s *cmd_ctx, char *cmd, char *
return ERROR_OK;
}
int handle_etm_trigger_percent_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
static int handle_etm_trigger_percent_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
......@@ -1720,7 +1722,7 @@ int handle_etm_trigger_percent_command(struct command_context_s *cmd_ctx, char *
return ERROR_OK;
}
int handle_etm_start_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
static int handle_etm_start_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
......@@ -1765,7 +1767,7 @@ int handle_etm_start_command(struct command_context_s *cmd_ctx, char *cmd, char
return ERROR_OK;
}
int handle_etm_stop_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
static int handle_etm_stop_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
......@@ -1801,7 +1803,7 @@ int handle_etm_stop_command(struct command_context_s *cmd_ctx, char *cmd, char *
return ERROR_OK;
}
int handle_etm_analyze_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
static int handle_etm_analyze_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
......
......@@ -36,7 +36,7 @@
#include <stdlib.h>
int handle_etm_dummy_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
static int handle_etm_dummy_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
......@@ -69,7 +69,7 @@ int handle_etm_dummy_config_command(struct command_context_s *cmd_ctx, char *cmd
return ERROR_OK;
}
int etm_dummy_register_commands(struct command_context_s *cmd_ctx)
static int etm_dummy_register_commands(struct command_context_s *cmd_ctx)
{
command_t *etm_dummy_cmd;
......@@ -80,27 +80,27 @@ int etm_dummy_register_commands(struct command_context_s *cmd_ctx)
return ERROR_OK;
}
int etm_dummy_init(etm_context_t *etm_ctx)
static int etm_dummy_init(etm_context_t *etm_ctx)
{
return ERROR_OK;
}
trace_status_t etm_dummy_status(etm_context_t *etm_ctx)
static trace_status_t etm_dummy_status(etm_context_t *etm_ctx)
{
return TRACE_IDLE;
}
int etm_dummy_read_trace(etm_context_t *etm_ctx)
static int etm_dummy_read_trace(etm_context_t *etm_ctx)
{
return ERROR_OK;
}
int etm_dummy_start_capture(etm_context_t *etm_ctx)
static int etm_dummy_start_capture(etm_context_t *etm_ctx)
{
return ERROR_ETM_PORTMODE_NOT_SUPPORTED;
}
int etm_dummy_stop_capture(etm_context_t *etm_ctx)
static int etm_dummy_stop_capture(etm_context_t *etm_ctx)
{
return ERROR_OK;
}
......
......@@ -28,6 +28,5 @@
#include "etm.h"
extern etm_capture_driver_t etm_dummy_capture_driver;
extern int etm_dummy_register_commands(struct command_context_s *cmd_ctx);
#endif /* ETB_H */
......@@ -113,7 +113,7 @@ static int autodetect_image_type(image_t *image, char *url)
return ERROR_OK;
}
int identify_image_type(image_t *image, char *type_string, char *url)
static int identify_image_type(image_t *image, char *type_string, char *url)
{
if (type_string)
{
......@@ -154,7 +154,7 @@ int identify_image_type(image_t *image, char *type_string, char *url)
return ERROR_OK;
}
int image_ihex_buffer_complete(image_t *image)
static int image_ihex_buffer_complete(image_t *image)
{
image_ihex_t *ihex = image->type_private;
fileio_t *fileio = &ihex->fileio;
......@@ -344,7 +344,7 @@ int image_ihex_buffer_complete(image_t *image)
return ERROR_IMAGE_FORMAT_ERROR;
}
int image_elf_read_headers(image_t *image)
static int image_elf_read_headers(image_t *image)
{
image_elf_t *elf = image->type_private;
u32 read_bytes;
......@@ -445,7 +445,7 @@ int image_elf_read_headers(image_t *image)
return ERROR_OK;
}
int image_elf_read_section(image_t *image, int section, u32 offset, u32 size, u8 *buffer, u32 *size_read)
static int image_elf_read_section(image_t *image, int section, u32 offset, u32 size, u8 *buffer, u32 *size_read)
{
image_elf_t *elf = image->type_private;
Elf32_Phdr *segment = (Elf32_Phdr *)image->sections[section].private;
......@@ -486,7 +486,7 @@ int image_elf_read_section(image_t *image, int section, u32 offset, u32 size, u8
return ERROR_OK;
}
int image_mot_buffer_complete(image_t *image)
static int image_mot_buffer_complete(image_t *image)
{
image_mot_t *mot = image->type_private;
fileio_t *fileio = &mot->fileio;
......
......@@ -41,7 +41,9 @@
#include <stdlib.h>
int oocd_trace_read_reg(oocd_trace_t *oocd_trace, int reg, u32 *value)
static int oocd_trace_register_commands(struct command_context_s *cmd_ctx);
static int oocd_trace_read_reg(oocd_trace_t *oocd_trace, int reg, u32 *value)
{
size_t bytes_written, bytes_read, bytes_to_read;
u8 cmd;
......@@ -61,7 +63,7 @@ int oocd_trace_read_reg(oocd_trace_t *oocd_trace, int reg, u32 *value)
return ERROR_OK;
}
int oocd_trace_write_reg(oocd_trace_t *oocd_trace, int reg, u32 value)
static int oocd_trace_write_reg(oocd_trace_t *oocd_trace, int reg, u32 value)
{
size_t bytes_written;
u8 data[5];
......@@ -78,7 +80,7 @@ int oocd_trace_write_reg(oocd_trace_t *oocd_trace, int reg, u32 value)
return ERROR_OK;
}
int oocd_trace_read_memory(oocd_trace_t *oocd_trace, u8 *data, u32 address, u32 size)
static int oocd_trace_read_memory(oocd_trace_t *oocd_trace, u8 *data, u32 address, u32 size)
{
size_t bytes_written, bytes_to_read;
ssize_t bytes_read;
......@@ -105,7 +107,7 @@ int oocd_trace_read_memory(oocd_trace_t *oocd_trace, u8 *data, u32 address, u32
return ERROR_OK;
}
int oocd_trace_init(etm_context_t *etm_ctx)
static int oocd_trace_init(etm_context_t *etm_ctx)
{
u8 trash[256];
oocd_trace_t *oocd_trace = etm_ctx->capture_driver_priv;
......@@ -152,7 +154,7 @@ int oocd_trace_init(etm_context_t *etm_ctx)
return ERROR_OK;
}
trace_status_t oocd_trace_status(etm_context_t *etm_ctx)
static trace_status_t oocd_trace_status(etm_context_t *etm_ctx)
{
oocd_trace_t *oocd_trace = etm_ctx->capture_driver_priv;
u32 status;
......@@ -184,7 +186,7 @@ trace_status_t oocd_trace_status(etm_context_t *etm_ctx)
return etm_ctx->capture_status;
}
int oocd_trace_read_trace(etm_context_t *etm_ctx)
static int oocd_trace_read_trace(etm_context_t *etm_ctx)
{
oocd_trace_t *oocd_trace = etm_ctx->capture_driver_priv;
u32 status, address;
......@@ -242,7 +244,7 @@ int oocd_trace_read_trace(etm_context_t *etm_ctx)
return ERROR_OK;
}
int oocd_trace_start_capture(etm_context_t *etm_ctx)
static int oocd_trace_start_capture(etm_context_t *etm_ctx)
{
oocd_trace_t *oocd_trace = etm_ctx->capture_driver_priv;
u32 control = 0x1; /* 0x1: enabled */
......@@ -275,7 +277,7 @@ int oocd_trace_start_capture(etm_context_t *etm_ctx)
return ERROR_OK;
}
int oocd_trace_stop_capture(etm_context_t *etm_ctx)
static int oocd_trace_stop_capture(etm_context_t *etm_ctx)
{
oocd_trace_t *oocd_trace = etm_ctx->capture_driver_priv;
......@@ -298,7 +300,7 @@ etm_capture_driver_t oocd_trace_capture_driver =
.read_trace = oocd_trace_read_trace,
};
int handle_oocd_trace_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
static int handle_oocd_trace_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
......@@ -336,7 +338,7 @@ int handle_oocd_trace_config_command(struct command_context_s *cmd_ctx, char *cm
return ERROR_OK;
}
int handle_oocd_trace_status_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
static int handle_oocd_trace_status_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
......@@ -376,7 +378,7 @@ int handle_oocd_trace_status_command(struct command_context_s *cmd_ctx, char *cm
return ERROR_OK;
}
int handle_oocd_trace_resync_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
static int handle_oocd_trace_resync_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
target_t *target;
armv4_5_common_t *armv4_5;
......
......@@ -59,6 +59,4 @@ typedef struct oocd_trace_s
extern etm_capture_driver_t oocd_trace_capture_driver;
extern int oocd_trace_register_commands(struct command_context_s *cmd_ctx);
#endif /* OOCD_TRACE_TRACE_H */
......@@ -59,32 +59,30 @@
#include <fileio.h>
#include <image.h>
int cli_target_callback_event_handler(struct target_s *target, enum target_event event, void *priv);
int handle_targets_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
int handle_reg_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
int handle_poll_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
int handle_halt_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
int handle_wait_halt_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
int handle_reset_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
int handle_soft_reset_halt_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
int handle_resume_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
int handle_step_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
int handle_md_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
int handle_mw_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);