Make remote file transfers interruptible
authorGary Benson <gbenson@redhat.com>
Fri, 21 Aug 2015 16:10:24 +0000 (17:10 +0100)
committerGary Benson <gbenson@redhat.com>
Fri, 21 Aug 2015 16:15:28 +0000 (17:15 +0100)
This commit makes it possible to interrupt remote file transfers.

gdb/ChangeLog:

* gdb_bfd.c (gdb_bfd_iovec_fileio_pread): Add QUIT call.

gdb/ChangeLog
gdb/gdb_bfd.c

index 60ad150..4813c04 100644 (file)
@@ -1,5 +1,9 @@
 2015-08-21  Gary Benson  <gbenson@redhat.com>
 
+       * gdb_bfd.c (gdb_bfd_iovec_fileio_pread): Add QUIT call.
+
+2015-08-21  Gary Benson  <gbenson@redhat.com>
+
        * 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.
index 264b611..1a6ccc1 100644 (file)
@@ -253,6 +253,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);