[PATCH 2/2] Make remote file transfers interruptible

Gary Benson
2015-08-05T15:28:23Z

This commit makes it possible to interrupt slow remote file transfers.

gdb/ChangeLog:

* gdb_bfd.c (gdb_bfd_iovec_fileio_pread): Add QUIT call.
---
gdb/ChangeLog | 4 ++++
gdb/gdb_bfd.c | 2 ++
2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/gdb/gdb_bfd.c b/gdb/gdb_bfd.c
index b511777..575bd61 100644
--- a/gdb/gdb_bfd.c
+++ b/gdb/gdb_bfd.c
@@ -277,6 +277,8 @@ gdb_bfd_iovec_fileio_pread (struct bfd *abfd, void *stream, void *buf,
pos = 0;
while (nbytes > pos)
{
+ QUIT;
+
bytes = target_fileio_pread (fd, (gdb_byte *) buf + pos,
nbytes - pos, offset + pos,
&target_errno);
--
1.7.1