mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-03 04:01:22 +08:00
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.
This commit is contained in:
@ -4922,7 +4922,8 @@ linux_nat_fileio_pid_of (struct inferior *inf)
|
||||
static int
|
||||
linux_nat_fileio_open (struct target_ops *self,
|
||||
struct inferior *inf, const char *filename,
|
||||
int flags, int mode, int *target_errno)
|
||||
int flags, int mode, int warn_if_slow,
|
||||
int *target_errno)
|
||||
{
|
||||
int nat_flags;
|
||||
mode_t nat_mode;
|
||||
|
Reference in New Issue
Block a user