* [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
* Re: [Patch]: Fix sockethost handling in board config
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
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2007-08-20 11:32 UTC (permalink / raw)
To: Markus Deuling; +Cc: Ulrich Weigand, GDB Patches
On Mon, Aug 20, 2007 at 07:18:28AM +0200, Markus Deuling wrote:
> 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.
Why does it need to be fixed? gdbserver doesn't do anything with the
hostname, so there's no need to pass it, and the existing sockethost
variable is honored. That's "sockethost", not "gdb,sockethost".
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch]: Fix sockethost handling in board config
2007-08-20 11:32 ` Daniel Jacobowitz
@ 2007-08-20 12:30 ` Markus Deuling
2007-08-20 12:47 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Markus Deuling @ 2007-08-20 12:30 UTC (permalink / raw)
To: Daniel Jacobowitz, Ulrich Weigand, GDB Patches
Daniel Jacobowitz schrieb:
>>
>> 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.
>
> Why does it need to be fixed? gdbserver doesn't do anything with the
> hostname, so there's no need to pass it, and the existing sockethost
> variable is honored. That's "sockethost", not "gdb,sockethost".
>
Neither "sockethost" nor "gdb,sockethost" is honored currently.
<snip>
# Export the host:port pair.
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_exe
</snip>
The hostname isnt passed to the gdbserver command.
Why is it gdb,socketport and sockethost?!? I think it makes sense to name the two
variables in the same way. They are a pair that belongs together.
--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch]: Fix sockethost handling in board config
2007-08-20 12:30 ` Markus Deuling
@ 2007-08-20 12:47 ` Daniel Jacobowitz
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2007-08-20 12:47 UTC (permalink / raw)
To: Markus Deuling; +Cc: Ulrich Weigand, GDB Patches
On Mon, Aug 20, 2007 at 02:28:39PM +0200, Markus Deuling wrote:
> Daniel Jacobowitz schrieb:
> >>
> >> 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.
> > Why does it need to be fixed? gdbserver doesn't do anything with the
> > hostname, so there's no need to pass it, and the existing sockethost
> > variable is honored. That's "sockethost", not "gdb,sockethost".
>
> Neither "sockethost" nor "gdb,sockethost" is honored currently.
That is incorrect.
if [target_info exists sockethost] {
set debughost [target_info sockethost]
} else {
set debughost "localhost:"
}
The sockethost is passed to gdb.
> The hostname isnt passed to the gdbserver command.
Gdbserver doesn't use the hostname, so why should it be passed?
> Why is it gdb,socketport and sockethost?!? I think it makes sense to name the
> two
> variables in the same way. They are a pair that belongs together.
True. However, there is an existing and working name. If you change
the name, you're going to break any other working board
configurations.
--
Daniel Jacobowitz
CodeSourcery
^ 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