Skip to content
Commit b6dfea24 authored by Tom de Vries's avatar Tom de Vries
Browse files

[gdb/testsuite] Factor out proc get_portnum



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

Factor this out into a new proc get_portnum.

Tested on aarch64-linux.

Approved-By: default avatarTom Tromey <tom@tromey.com>
parent f4b228ee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment