[PATCH 1/7] [gdb/testsuite] Factor out proc get_portnum

Tom Tromey tom@tromey.com
Fri May 3 20:19:15 GMT 2024


>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> In gdbserver_start, we have some code that determines what port number to use:
Tom> ...
Tom>     # Port id -- either specified in baseboard file, or managed here.
Tom>     if [target_info exists gdb,socketport] {
Tom>        set portnum [target_info gdb,socketport]
Tom>     } else {
Tom>        # Bump the port number to avoid conflicts with hung ports.
Tom>        incr portnum
Tom>     }
Tom> ...

Tom> Factor this out into a new proc get_portnum.

Tom> Tested on aarch64-linux.

Looks good.
Approved-By: Tom Tromey <tom@tromey.com>

Tom


More information about the Gdb-patches mailing list