LOG_ERROR("BUG: register packet is too small for registers");
}
- struct reg_arch_type *arch_type;
bin_buf = malloc(DIV_ROUND_UP(reg_list[i]->size, 8));
gdb_target_to_reg(target, packet_p, chars, bin_buf);
- /* get register arch_type, and call set method */
- arch_type = register_get_arch_type(reg_list[i]->arch_type);
-
- arch_type->set(reg_list[i], bin_buf);
+ reg_list[i]->type->set(reg_list[i], bin_buf);
/* advance packet pointer */
packet_p += chars;
struct reg **reg_list;
int reg_list_size;
int retval;
- struct reg_arch_type *arch_type;
LOG_DEBUG("-");
gdb_target_to_reg(target, separator + 1, chars, bin_buf);
- /* get register arch_type, and call set method */
- arch_type = register_get_arch_type(reg_list[reg_num]->arch_type);
- arch_type->set(reg_list[reg_num], bin_buf);
+ reg_list[reg_num]->type->set(reg_list[reg_num], bin_buf);
gdb_put_packet(connection, "OK", 2);
COMMAND_HANDLER(handle_gdb_sync_command)
{
- if (argc != 0)
+ if (CMD_ARGC != 0)
{
return ERROR_COMMAND_SYNTAX_ERROR;
}
COMMAND_HANDLER(handle_gdb_memory_map_command)
{
- if (argc == 1)
+ if (CMD_ARGC == 1)
{
if (strcmp(args[0], "enable") == 0)
{
COMMAND_HANDLER(handle_gdb_flash_program_command)
{
- if (argc == 1)
+ if (CMD_ARGC == 1)
{
if (strcmp(args[0], "enable") == 0)
{
COMMAND_HANDLER(handle_gdb_report_data_abort_command)
{
- if (argc == 1)
+ if (CMD_ARGC == 1)
{
if (strcmp(args[0], "enable") == 0)
{
/* gdb_breakpoint_override */
COMMAND_HANDLER(handle_gdb_breakpoint_override_command)
{
- if (argc == 0)
+ if (CMD_ARGC == 0)
{
- } else if (argc == 1)
+ } else if (CMD_ARGC == 1)
{
gdb_breakpoint_override = 1;
if (strcmp(args[0], "hard") == 0)