aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-01-27 13:02:22 +0000
committerPedro Alves <palves@redhat.com>2012-01-27 13:02:22 +0000
commit048fe15a05cfc41215623ec67483c1dc56c8419f (patch)
tree675117f7919ee2e24f90db5d28234648be3030aa /gdb/testsuite/lib
parent4220b2f845b8e4474064c52c3be6804eecd6ab25 (diff)
downloadgdb-048fe15a05cfc41215623ec67483c1dc56c8419f.zip
gdb-048fe15a05cfc41215623ec67483c1dc56c8419f.tar.gz
gdb-048fe15a05cfc41215623ec67483c1dc56c8419f.tar.bz2
2012-01-27 Pedro Alves <palves@redhat.com>
* config/extended-gdbserver.exp: New file. * lib/gdbserver-support.exp (gdbserver_start_extended): Extend comment. (gdbserver_start_multi, mi_gdbserver_start_multi): New. * boards/native-extended-gdbserver.exp: New file.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r--gdb/testsuite/lib/gdbserver-support.exp33
1 files changed, 32 insertions, 1 deletions
diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gdbserver-support.exp
index 11d9107..6d3a0e5 100644
--- a/gdb/testsuite/lib/gdbserver-support.exp
+++ b/gdb/testsuite/lib/gdbserver-support.exp
@@ -355,7 +355,9 @@ proc gdbserver_reconnect { } {
return [gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport]
}
-# Start and connect to a gdbserver in extended mode.
+# Start and connect to a gdbserver in extended mode. Note this frobs
+# $gdbserver_protocol, so should be used only from a board that
+# usually connects in target remote mode.
proc gdbserver_start_extended { } {
global gdbserver_protocol
global gdbserver_gdbport
@@ -372,3 +374,32 @@ proc gdbserver_start_extended { } {
return [gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport]
}
+
+# Start and connect to a gdbserver in extended/multi mode. Unlike
+# gdbserver_start_extended, this does not frob $gdbserver_protocol.
+
+proc gdbserver_start_multi { } {
+ global gdbserver_protocol
+ global gdbserver_gdbport
+
+ set res [gdbserver_start "--multi" ""]
+ set gdbserver_protocol [lindex $res 0]
+ set gdbserver_gdbport [lindex $res 1]
+
+ return [gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport]
+}
+
+# Start a gdbserver process in multi/extended mode, and have GDB
+# connect to it (MI version). Return 0 on success, or non-zero on
+# failure.
+
+proc mi_gdbserver_start_multi { } {
+ global gdbserver_protocol
+ global gdbserver_gdbport
+
+ set res [gdbserver_start "--multi" ""]
+ set gdbserver_protocol [lindex $res 0]
+ set gdbserver_gdbport [lindex $res 1]
+
+ return [mi_gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport]
+}