This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
[RFC] add gdbserver target
- From: "Martin M. Hunt" <hunt at redhat dot com>
- To: insight at sources dot redhat dot com
- Date: Wed, 9 Oct 2002 10:40:25 -0700
- Subject: [RFC] add gdbserver target
- Organization: Red Hat Inc
This patch adds a "GDBserver" target name to the target dialog. This is
identical to a remote target, except it does not download, and it continues
instead of running.
--
Martin Hunt
GDB Engineer
Red Hat, Inc
2002-10-09 Martin M. Hunt <hunt@redhat.com>
* library/targetselection.itb (init_target_db): Add gdbserver
target.
(get_target_list): Always add "gdbserver" to list of valid targets.
(valid_target): Always allow "gdbserver".
Index: targetselection.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/targetselection.itb,v
retrieving revision 1.10
diff -u -u -r1.10 targetselection.itb
--- targetselection.itb 12 Feb 2002 20:05:14 -0000 1.10
+++ targetselection.itb 9 Oct 2002 17:37:43 -0000
@@ -261,6 +261,21 @@
set gdb_target(vxworks,cmd) "vxworks ethX"
set gdb_target(vxworks,runlist) { 1 0 1 1}
set gdb_target(vxworks,after_attaching) { sym vxWorks.st }
+
+ # GDBServer
+ set gdb_target(gdbserver,pretty-name) "GDBserver"
+ set gdb_target(gdbserver,pretty-name) "GDBserver/Serial"
+ set gdb_target(gdbserver,defbaud) "115200"
+ set gdb_target(gdbserver,baud-rates) {9600 19200 38400 57600 115200}
+ set gdb_target(gdbserver,cmd) "remote com1"
+ set gdb_target(gdbserver,runlist) {1 0 0 1}
+ set gdb_target(gdbserver,after_attaching) {}
+ set gdb_target(gdbservertcp,pretty-name) "GDBserver/TCP"
+ set gdb_target(gdbservertcp,defbaud) "TCP"
+ set gdb_target(gdbservertcp,baud-rates) {}
+ set gdb_target(gdbservertcp,cmd) "remote tcpX"
+ set gdb_target(gdbservertcp,runlist) {1 0 0 1}
+ set gdb_target(gdbservertcp,after_attaching) {}
}
body TargetSelection::default_port {} {
@@ -897,6 +912,7 @@
lappend names $name
}
}
+ lappend names gdbserver
return $names
}
@@ -1036,6 +1052,10 @@
# Returns 1 if TARGET is a _runnable_ target for this gdb.
body TargetSelection::valid_target {target} {
+
+ # always allow gdbserver
+ if {$target == "gdbserver"} {return 1}
+
set err [catch {gdb_cmd "help target $target"}]
if {$target == "exec" && ![native_debugging]} {
set err 1