mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 22:48:57 +08:00
gdb/testsuite/
* lib/gdbserver-support.exp (gdbserver_start): Loop spawning gdbserver increasing $portnum if "Can't bind address" has been seen.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2009-07-06 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
* lib/gdbserver-support.exp (gdbserver_start): Loop spawning
|
||||||
|
gdbserver increasing $portnum if "Can't bind address" has been seen.
|
||||||
|
|
||||||
2009-07-05 Pedro Alves <pedro@codesourcery.com>
|
2009-07-05 Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
* gdb.base/ending-run.exp: Add "step out of main" pattern for
|
* gdb.base/ending-run.exp: Add "step out of main" pattern for
|
||||||
|
@ -209,6 +209,8 @@ proc gdbserver_start { options arguments } {
|
|||||||
|
|
||||||
set gdbserver [find_gdbserver]
|
set gdbserver [find_gdbserver]
|
||||||
|
|
||||||
|
# Loop till we find a free port.
|
||||||
|
while 1 {
|
||||||
# Export the host:port pair.
|
# Export the host:port pair.
|
||||||
set gdbport $debughost$portnum
|
set gdbport $debughost$portnum
|
||||||
|
|
||||||
@ -229,6 +231,17 @@ proc gdbserver_start { options arguments } {
|
|||||||
-i $server_spawn_id
|
-i $server_spawn_id
|
||||||
-notransfer
|
-notransfer
|
||||||
-re "Listening on" { }
|
-re "Listening on" { }
|
||||||
|
-re "Can't bind address: Address already in use\\.\r\n" {
|
||||||
|
verbose -log "Port $portnum is already in use."
|
||||||
|
if ![target_info exists gdb,socketport] {
|
||||||
|
# Bump the port number to avoid the conflict.
|
||||||
|
wait -i $expect_out(spawn_id)
|
||||||
|
incr portnum
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
# We can't just call close, because if gdbserver is local then that means
|
# We can't just call close, because if gdbserver is local then that means
|
||||||
|
Reference in New Issue
Block a user