diff options
author | Gary Benson <gbenson@redhat.com> | 2015-08-21 17:09:20 +0100 |
---|---|---|
committer | Gary Benson <gbenson@redhat.com> | 2015-08-21 17:11:36 +0100 |
commit | 4313b8c0ed5877feb5034bfff4056e1ccfe221f1 (patch) | |
tree | b5585d614337ee376a5dc247272d846254e1dc88 /gdb/testsuite | |
parent | f36b87190aed31b1ef7787e5966be542e8abdb58 (diff) | |
download | binutils-gdb-4313b8c0ed5877feb5034bfff4056e1ccfe221f1.tar.gz |
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.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.trace/pending.exp | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 3ab4d748803..515a6698aca 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-08-21 Gary Benson <gbenson@redhat.com> + + * gdb.trace/pending.exp: Cope with remote transfer warnings. + 2015-08-20 Pedro Alves <palves@redhat.com> * gdb.server/solib-list.exp: No longer expect an interior stop in diff --git a/gdb/testsuite/gdb.trace/pending.exp b/gdb/testsuite/gdb.trace/pending.exp index 0399807b810..9938c5ae841 100644 --- a/gdb/testsuite/gdb.trace/pending.exp +++ b/gdb/testsuite/gdb.trace/pending.exp @@ -221,7 +221,7 @@ proc pending_tracepoint_resolved_during_trace { trace_type } \ fail $test } } - -re "Continuing.\r\n\r\nBreakpoint.*marker.*at.*$srcfile.*$gdb_prompt $" { + -re "Continuing.\r\n(Reading .* from remote target...\r\n)?\r\nBreakpoint.*marker.*at.*$srcfile.*$gdb_prompt $" { pass $test } } @@ -294,7 +294,7 @@ proc pending_tracepoint_installed_during_trace { trace_type } \ fail $test } } - -re "Continuing.\r\n\r\nBreakpoint.*marker.*at.*$srcfile.*$gdb_prompt $" { + -re "Continuing.\r\n(Reading .* from remote target...\r\n)?\r\nBreakpoint.*marker.*at.*$srcfile.*$gdb_prompt $" { pass $test } } @@ -391,7 +391,7 @@ proc pending_tracepoint_disconnect_after_resolved { trace_type } \ gdb_test "continue" "Continuing.\r\n\r\nBreakpoint.*marker.*at.*pending.c.*" \ "continue to marker 1" - gdb_test "continue" "Continuing.\r\n\r\nBreakpoint.*marker.*at.*pending.c.*" \ + gdb_test "continue" "Continuing.\r\n(Reading .* from remote target...\r\n)?\r\nBreakpoint.*marker.*at.*pending.c.*" \ "continue to marker 2" # There should be no pending tracepoint, so no warning should be emitted. @@ -473,7 +473,7 @@ proc pending_tracepoint_with_action_resolved { trace_type } \ fail $test } } - -re "Continuing.\r\n\r\nBreakpoint.*marker.*at.*$srcfile.*$gdb_prompt $" { + -re "Continuing.\r\n(Reading .* from remote target...\r\n)?\r\nBreakpoint.*marker.*at.*$srcfile.*$gdb_prompt $" { pass "continue to marker 2" } |