aboutsummaryrefslogtreecommitdiff
path: root/src/openocd.c
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-28 18:56:23 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-30 16:29:24 -0800
commitec6c1962c2398a574a5c413b41483370347b9f5b (patch)
treebfc86b1688a97f2495e7d2c58c42dd36ae72848c /src/openocd.c
parent2264270fe49a447e6f06ec4069a816cc86c3cf0b (diff)
downloadriscv-openocd-ec6c1962c2398a574a5c413b41483370347b9f5b.zip
riscv-openocd-ec6c1962c2398a574a5c413b41483370347b9f5b.tar.gz
riscv-openocd-ec6c1962c2398a574a5c413b41483370347b9f5b.tar.bz2
improve gdb_init() sequence
Rework gdb_init to create flexible APIs (gdb_target_add_{one,all}) and static helper (gdb_target_start) for starting GDB services. Eliminates duplicated code and provides general mechanisms for adding GDB services. The 'init' command is updated to call the new API, and later patches can decouple its policy of adding all targets therein. Provides the new capability to use both piped and TCP servers when multiple targets are defined. The first target fills the pipe, and others will be started on TCP ports (unless disabled, i.e. gdb_port=0).
Diffstat (limited to 'src/openocd.c')
-rw-r--r--src/openocd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openocd.c b/src/openocd.c
index 01e9e79..7f6af4c 100644
--- a/src/openocd.c
+++ b/src/openocd.c
@@ -154,7 +154,7 @@ COMMAND_HANDLER(handle_init_command)
/* initialize telnet subsystem */
telnet_init("Open On-Chip Debugger");
- gdb_init();
+ gdb_target_add_all(all_targets);
tcl_init(); /* allows tcl to just connect without going thru telnet */
target_register_event_callback(log_target_callback_event_handler, CMD_CTX);