aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/python.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2023-07-24 17:35:54 +0100
committerAndrew Burgess <aburgess@redhat.com>2025-10-03 13:56:46 +0100
commit5edcbe2277db05b77ebf53f9c30b6c889a8729bc (patch)
tree697a0de087befcf3e1bde8361d962c45960b8313 /gdb/python/python.c
parent823384610d4275799213c5821305f8f0acdc9140 (diff)
downloadbinutils-5edcbe2277db05b77ebf53f9c30b6c889a8729bc.zip
binutils-5edcbe2277db05b77ebf53f9c30b6c889a8729bc.tar.gz
binutils-5edcbe2277db05b77ebf53f9c30b6c889a8729bc.tar.bz2
gdb: detect when gdbserver has no default executable set
This commit extends the use of the new qExecAndArgs packet (added in the previous commit) so that GDB now understands when it is connected to a remote server that doesn't have a default executable set. We don't do much with this information right now, other than produce more useful text for 'show remote exec-file'. Here I've connected to a gdbserver with no default executable set, this is with this patch in place: (gdb) target extended-remote | gdbserver --multi --once - (gdb) show remote exec-file The remote exec-file is unset, the remote has no default executable set. (gdb) file /tmp/hello.x Reading symbols from /tmp/hello.x... (gdb) run Starting program: /tmp/hello.x Running the default executable on the remote target failed; try "set remote exec-file"? (gdb) The important line is this one: The remote exec-file is unset, the remote has no default executable set. Without this patch we'd get: The remote exec-file is unset, the default remote executable will be used. The new message is clearer that there is no default executable set on the remote. In the future I plan to make use of this additional information, coupled with an understanding (via 'set sysroot') of when gdb and gdbserver share the same filesystem, to allow GDB to automatically use the current executable (e.g. loaded with the 'file' command) as the remote exec-file. But this is not part of this patch, or this patch series, just future planned work. Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/python/python.c')
0 files changed, 0 insertions, 0 deletions