From d0f32d0ed5045aa45578d19c5419cf5b323e4891 Mon Sep 17 00:00:00 2001 From: oharboe Date: Mon, 21 Jul 2008 18:24:43 +0000 Subject: [PATCH] restart is a per-target action git-svn-id: svn://svn.berlios.de/openocd/trunk@853 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/helper/startup.tcl | 8 ++++++-- src/server/gdb_server.c | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/helper/startup.tcl b/src/helper/startup.tcl index acc4d318..a7697758 100644 --- a/src/helper/startup.tcl +++ b/src/helper/startup.tcl @@ -153,7 +153,11 @@ add_help_text script " - filename of OpenOCD script (tcl) to run" -# Handle GDB 'R' packet. Can be overriden by configuration script -proc gdb_restart {} { +# Handle GDB 'R' packet. Can be overriden by configuration script, +# but it's not something one would expect target scripts to do +# normally +proc ocd_gdb_restart {target_num} { + # Fix!!! we're resetting all targets here! Really we should reset only + # one target reset halt } \ No newline at end of file diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index e964a1d5..ffbd8d0d 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -1950,7 +1950,7 @@ int gdb_input_inner(connection_t *connection) break; case 'R': /* handle extended restart packet */ - command_run_linef(connection->cmd_ctx, "gdb_restart"); + command_run_linef(connection->cmd_ctx, "ocd_gdb_restart %d", get_num_by_target(target)); break; default: /* ignore unkown packets */ -- 2.39.5