summaryrefslogtreecommitdiff
path: root/src/server/gdb_server.c
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-10-06 12:09:27 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-10-06 12:09:27 +0000
commit7fd9ba22ba2faefc2b6cadeb7c26c23981458339 (patch)
tree17b11c88773c6d16f33bc0c38976e4c6058027c6 /src/server/gdb_server.c
parent7b369df52cb71fab738fc852c9358059f6cff57c (diff)
downloadopenocd_libswd-7fd9ba22ba2faefc2b6cadeb7c26c23981458339.tar.gz
openocd_libswd-7fd9ba22ba2faefc2b6cadeb7c26c23981458339.tar.bz2
openocd_libswd-7fd9ba22ba2faefc2b6cadeb7c26c23981458339.tar.xz
openocd_libswd-7fd9ba22ba2faefc2b6cadeb7c26c23981458339.zip
Centralize error handling for buggy register handling
git-svn-id: svn://svn.berlios.de/openocd/trunk@1019 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/server/gdb_server.c')
-rw-r--r--src/server/gdb_server.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index b5a35f58..851777a9 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -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);