mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 09:58:19 +08:00
gdb/testsuite: respect GDBSERVER variable in remote-stdio-gdbserver "board"
The comment on top of gdb/testsuite/boards/remote-stdio-gdbserver.exp says that user can specify path to gdbserver on remote system by setting GDBSERVER variable. However, this variable was ignored and /usr/bin/gdbserver was used unconditionally. This commit updates the code to respect GDBSERVER if set and fall back to /usr/bin/gdbserver if not.
This commit is contained in:
@ -56,6 +56,13 @@ if [info exists REMOTE_TMPDIR] {
|
|||||||
set_board_info remotedir $REMOTE_TMPDIR
|
set_board_info remotedir $REMOTE_TMPDIR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unset_board_info gdb_server_prog
|
||||||
|
if [info exists GDBSERVER] {
|
||||||
|
set_board_info gdb_server_prog $GDBSERVER
|
||||||
|
} else {
|
||||||
|
set_board_info gdb_server_prog /usr/bin/gdbserver
|
||||||
|
}
|
||||||
|
|
||||||
proc get_remote_login { } {
|
proc get_remote_login { } {
|
||||||
set result ""
|
set result ""
|
||||||
if {[board_info [target_info name] exists username]} {
|
if {[board_info [target_info name] exists username]} {
|
||||||
@ -70,7 +77,8 @@ proc get_remote_login { } {
|
|||||||
proc get_target_remote_pipe_cmd { } {
|
proc get_target_remote_pipe_cmd { } {
|
||||||
set target_exec [gdbserver_download_current_prog]
|
set target_exec [gdbserver_download_current_prog]
|
||||||
set rsh_cmd "[board_info [target_info name] rsh_prog] [get_remote_login]"
|
set rsh_cmd "[board_info [target_info name] rsh_prog] [get_remote_login]"
|
||||||
return "$rsh_cmd /usr/bin/gdbserver --once stdio $target_exec"
|
set gdbserver "[board_info [target_info name] gdb_server_prog]"
|
||||||
|
return "$rsh_cmd $gdbserver --once stdio $target_exec"
|
||||||
}
|
}
|
||||||
|
|
||||||
proc ${board}_file { dest op args } {
|
proc ${board}_file { dest op args } {
|
||||||
|
Reference in New Issue
Block a user