diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-07-24 06:07:55 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-07-24 06:07:55 +0000 |
commit | 06d501a192e36986ba0f81c7ddff9298dd0a389e (patch) | |
tree | 073f1ebd2d6d8f0957273ceaacd9e4c0ad4ea5bc /src/server | |
parent | 1c92ff6a04b27b0aee1058db0b605b73c0dc296c (diff) | |
download | openocd+libswd-06d501a192e36986ba0f81c7ddff9298dd0a389e.tar.gz openocd+libswd-06d501a192e36986ba0f81c7ddff9298dd0a389e.tar.bz2 openocd+libswd-06d501a192e36986ba0f81c7ddff9298dd0a389e.tar.xz openocd+libswd-06d501a192e36986ba0f81c7ddff9298dd0a389e.zip |
wait 500ms for target to halt upon connect.
git-svn-id: svn://svn.berlios.de/openocd/trunk@865 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/gdb_server.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index cea5ad0d..bbcff58c 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -509,6 +509,7 @@ int gdb_get_packet_inner(connection_t *connection, char *buffer, int *len) my_checksum += character & 0xff; buffer[count++] = character & 0xff; } + } *len = count; @@ -678,6 +679,12 @@ int gdb_new_connection(connection_t *connection) * connect. */ target_halt(gdb_service->target); + /* FIX!!!! could extended-remote work better here? + * + * wait a tiny bit for halted state or we just continue. The + * GDB register packet will then contain garbage + */ + target_wait_state(gdb_service->target, TARGET_HALTED, 500); /* remove the initial ACK from the incoming buffer */ if ((retval = gdb_get_char(connection, &initial_ack)) != ERROR_OK) |