Centralize error handling for buggy register handling

git-svn-id: svn://svn.berlios.de/openocd/trunk@1019 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
oharboe
2008-10-06 12:09:27 +00:00
parent 7b369df52c
commit 7fd9ba22ba
3 changed files with 13 additions and 32 deletions

View File

@@ -936,11 +936,7 @@ int gdb_set_registers_packet(connection_t *connection, target_t *target, char *p
/* get register arch_type, and call set method */
arch_type = register_get_arch_type(reg_list[i]->arch_type);
if (arch_type == NULL)
{
LOG_ERROR("BUG: encountered unregistered arch type");
exit(-1);
}
arch_type->set(reg_list[i], bin_buf);
/* advance packet pointer */
@@ -1033,11 +1029,6 @@ int gdb_set_register_packet(connection_t *connection, target_t *target, char *pa
/* get register arch_type, and call set method */
arch_type = register_get_arch_type(reg_list[reg_num]->arch_type);
if (arch_type == NULL)
{
LOG_ERROR("BUG: encountered unregistered arch type");
exit(-1);
}
arch_type->set(reg_list[reg_num], bin_buf);
gdb_put_packet(connection, "OK", 2);