Committed.

Allows config scripts to override handling of 'R'(restart) GDB packet.

Detach is more complicated. Tcl support is required to handle interaction
with targets. Also resetting a single target isn't currently possible, so
the detach handling in gdb server is broken in that regard.


Index: C:/workspace/openocd/src/helper/startup.tcl
===================================================================
--- C:/workspace/openocd/src/helper/startup.tcl (revision 851)
+++ C:/workspace/openocd/src/helper/startup.tcl (working copy)
@@ -152,3 +152,8 @@
 add_help_text script "<filename> - filename of OpenOCD script (tcl) to run"


+
+# Handle GDB 'R' packet. Can be overriden by configuration script
+proc gdb_restart {} {
+       reset halt
+}
\ No newline at end of file
Index: C:/workspace/openocd/src/server/gdb_server.c
===================================================================
--- C:/workspace/openocd/src/server/gdb_server.c        (revision 851)
+++ C:/workspace/openocd/src/server/gdb_server.c        (working copy)
@@ -1950,8 +1950,7 @@
                                        break;
                                case 'R':
                                        /* handle extended restart packet */
-                                       /* fix?? make this configurable? */
-                                       
target_process_reset(connection->cmd_ctx, RESET_HALT);
+                                       command_run_linef(connection->cmd_ctx, 
"gdb_restart");
                                        break;
                                default:
                                        /* ignore unkown packets */


-- 
Øyvind Harboe
http://www.zylin.com/zy1000.html
ARM7 ARM9 XScale Cortex
JTAG debugger and flash programmer
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to