aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-disasm.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2024-05-21 15:38:23 +0100
committerAndrew Burgess <aburgess@redhat.com>2024-06-11 20:41:17 +0100
commit1d6f5804daa5e05e77bcc50c4557b0553190f56c (patch)
tree9c12badb4235aa8622cf21376858aba32e9aac46 /gdb/python/py-disasm.c
parentc7e38ee47c9497cf1fc62d7474b619c61dbd7450 (diff)
downloadbinutils-1d6f5804daa5e05e77bcc50c4557b0553190f56c.zip
binutils-1d6f5804daa5e05e77bcc50c4557b0553190f56c.tar.gz
binutils-1d6f5804daa5e05e77bcc50c4557b0553190f56c.tar.bz2
gdb: warn of slow remote file reading only after a successful open
While working on a later patch in this series, I noticed that GDB would print the message: Reading /path/to/file from remote target... Even when /path/to/file doesn't exist on the remote target. GDB does indeed try to open /path/to/file, but I'm not sure we really need to tell the user unless we actually manage to open the file, and plan to read content from it. If we consider how GDB probes for separate debug files, we can attempt to open multiple possible files, most of them will not exist. When we are native debugging we don't bother telling the user about each file we're checking for, we just announce any file we finally use. I think it makes sense to do a similar thing for remote files. So, in remote_target::remote_hostio_open(), I'd like to move the block of code that prints the above message to after the open call has been made, and we should only print the message if the open succeeds. Now GDB only tells the user about files that we actually open and read from the remote. Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/python/py-disasm.c')
0 files changed, 0 insertions, 0 deletions