diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2009-10-12 09:27:27 +0200 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2009-10-12 09:27:27 +0200 |
commit | c8d935ab7cbffb8b72e52bc39bfe85bb97dce0ac (patch) | |
tree | 248eace01056bb90b12b8e507f43b18b72f88853 /src/server | |
parent | b23b096c8e712aabab263848594a2703f877d963 (diff) | |
download | riscv-openocd-c8d935ab7cbffb8b72e52bc39bfe85bb97dce0ac.zip riscv-openocd-c8d935ab7cbffb8b72e52bc39bfe85bb97dce0ac.tar.gz riscv-openocd-c8d935ab7cbffb8b72e52bc39bfe85bb97dce0ac.tar.bz2 |
If halt times out, stop GDB. Allows e.g. manual reset via monitor commands.
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/gdb_server.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 00de5fc..ad09a0e 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -2194,10 +2194,13 @@ int gdb_input_inner(connection_t *connection) retval = target_halt(target); if (retval != ERROR_OK) { - /* stop this debug session */ target_call_event_callbacks(target, TARGET_EVENT_GDB_HALT); } gdb_con->ctrl_c = 0; + } else + { + LOG_INFO("The target is not running when halt was requested, stopping GDB."); + target_call_event_callbacks(target, TARGET_EVENT_GDB_HALT); } } |