This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[Patch]: Fix sockethost handling in board config
- From: Markus Deuling <deuling at de dot ibm dot com>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>, GDB Patches <gdb-patches at sourceware dot org>
- Date: Mon, 20 Aug 2007 07:18:28 +0200
- Subject: [Patch]: Fix sockethost handling in board config
Hi,
this patch fixes handling of gdbserver parameter in testsuite/lib/gdbserver-support.exp.
When using the testsuite remotely there are two parameters possible for remote host configuration:
sockethost and socketport. Currently sockethost is ignored.
The format for host and port configuration is <host>:<port>. This patch also adds a ":" between sockethost and socketport to that it isn't needed to add it in a board configuration file anymore:
# Name of the computer whose socket will be used, if required.
set_board_info gdb,sockethost "localhost"
# Port ID to use for socket connection
set_board_info gdb,socketport "2222"
Tested on x86 by running testsuite remotely.
ChangeLog:
* testsuite/lib/gdbserver-support.exp (gdbserver_spawn): Fix sockethost
configuration.
Is this ok to commit?
--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com
diff -urpN src/gdb/testsuite/lib/gdbserver-support.exp dev/gdb/testsuite/lib/gdbserver-support.exp
--- src/gdb/testsuite/lib/gdbserver-support.exp 2007-07-03 05:52:21.000000000 +0200
+++ dev/gdb/testsuite/lib/gdbserver-support.exp 2007-08-20 06:44:45.000000000 +0200
@@ -179,10 +179,10 @@ proc gdbserver_spawn { child_args } {
}
# Extract the local and remote host ids from the target board struct.
- if [target_info exists sockethost] {
- set debughost [target_info sockethost]
+ if [target_info exists gdb,sockethost] {
+ set debughost [target_info gdb,sockethost]
} else {
- set debughost "localhost:"
+ set debughost "localhost"
}
# Extract the protocol
@@ -195,12 +195,12 @@ proc gdbserver_spawn { child_args } {
set gdbserver [find_gdbserver]
# Export the host:port pair.
- set gdbport $debughost$portnum
+ set gdbport $debughost:$portnum
# Fire off the debug agent. This flavour of gdbserver takes as
# arguments the port information, the name of the executable file to
# be debugged, and any arguments.
- set gdbserver_command "$gdbserver :$portnum $gdbserver_server_exec"
+ set gdbserver_command "$gdbserver $gdbport $gdbserver_server_exec"
if { $child_args != "" } {
append gdbserver_command " $child_args"
}