Warn when accessing binaries from remote targets
authorGary Benson <gbenson@redhat.com>
Fri, 21 Aug 2015 16:09:20 +0000 (17:09 +0100)
committerGary Benson <gbenson@redhat.com>
Fri, 21 Aug 2015 16:15:26 +0000 (17:15 +0100)
commit290f582b49a81b7fa01fc430bad1a7f9af21c922
tree95ad188c97fc95996de21a06eab8feed17db408b
parent23778dcc5bb92541850e239d10bf19eb311a57b6
Warn when accessing binaries from remote targets

GDB provides no indicator of progress during file operations, and can
appear to have locked up during slow remote transfers.  This commit
updates GDB to print a warning each time a file is accessed over RSP.
An additional message detailing how to avoid remote transfers is
printed for the first transfer only.

gdb/ChangeLog:

* target.h (struct target_ops) <to_fileio_open>: New argument
warn_if_slow.  Update comment.  All implementations updated.
(target_fileio_open_warn_if_slow): New declaration.
* target.c (target_fileio_open): Renamed as...
(target_fileio_open_1): ...this.  New argument warn_if_slow.
Pass warn_if_slow to implementation.  Update debug printing.
(target_fileio_open): New function.
(target_fileio_open_warn_if_slow): Likewise.
* gdb_bfd.c (gdb_bfd_iovec_fileio_open): Use new function
target_fileio_open_warn_if_slow.

gdb/testsuite/ChangeLog:

* gdb.trace/pending.exp: Cope with remote transfer warnings.
gdb/ChangeLog
gdb/gdb_bfd.c
gdb/inf-child.c
gdb/linux-nat.c
gdb/remote.c
gdb/target.c
gdb/target.h
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.trace/pending.exp