summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2006-10-03 09:56:41 +0000
committerdrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2006-10-03 09:56:41 +0000
commit5b747eeb4af35e2ab4a390e420583939db621c73 (patch)
tree2a19848e8528fbb8efb085251659d5e2e7b36bd9
parenta582e9a8d183c56d1aa8ae18afc1c11e2cbd6d2d (diff)
downloadopenocd_libswd-5b747eeb4af35e2ab4a390e420583939db621c73.tar.gz
openocd_libswd-5b747eeb4af35e2ab4a390e420583939db621c73.tar.bz2
openocd_libswd-5b747eeb4af35e2ab4a390e420583939db621c73.tar.xz
openocd_libswd-5b747eeb4af35e2ab4a390e420583939db621c73.zip
- fixed regression in gdb_server.c (Thanks to Michael Fischer for finding these bugs)
git-svn-id: svn://svn.berlios.de/openocd/trunk@101 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r--src/server/gdb_server.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index 5bbb446b..97f5fbfa 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -491,7 +491,7 @@ void gdb_str_to_target(target_t *target, char *str, char *tstr)
if (str_len % 2)
{
- ERROR("BUG: gdb value with uneven number of characters encountered");
+ ERROR("BUG: gdb value with uneven number of characters encountered: %s", str);
exit(-1);
}
@@ -703,7 +703,7 @@ int gdb_get_register_packet(connection_t *connection, target_t *target, char *pa
hex_buf = buf_to_str(reg_list[reg_num]->value, reg_list[reg_num]->size, 16);
- gdb_str_to_target(target, reg_packet, hex_buf);
+ gdb_str_to_target(target, hex_buf, reg_packet);
gdb_put_packet(connection, reg_packet, CEIL(reg_list[reg_num]->size, 8) * 2);
@@ -917,6 +917,7 @@ int gdb_write_memory_packet(connection_t *connection, target_t *target, char *pa
buffer[i] = tmp;
}
+ retval = ERROR_OK;
switch (len)
{
/* handle sized writes */
@@ -985,6 +986,7 @@ int gdb_write_memory_binary_packet(connection_t *connection, target_t *target, c
return ERROR_SERVER_REMOTE_CLOSED;
}
+ retval = ERROR_OK;
if( len ) {
buffer = malloc(len);