Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [Patch]: Fix sockethost handling in board config
@ 2007-08-20  5:20 Markus Deuling
  2007-08-20 11:32 ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Deuling @ 2007-08-20  5:20 UTC (permalink / raw)
  To: Ulrich Weigand, GDB Patches

[-- Attachment #1: Type: text/plain, Size: 881 bytes --]

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



[-- Attachment #2: diff-fix-gdbsrv --]
[-- Type: text/plain, Size: 1311 bytes --]

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"
     }


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-08-20 12:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-20  5:20 [Patch]: Fix sockethost handling in board config Markus Deuling
2007-08-20 11:32 ` Daniel Jacobowitz
2007-08-20 12:30   ` Markus Deuling
2007-08-20 12:47     ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox