Message ID | 1438788496-32246-3-git-send-email-gbenson@redhat.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 42796 invoked by alias); 5 Aug 2015 15:28:23 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 42781 invoked by uid 89); 5 Aug 2015 15:28:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 05 Aug 2015 15:28:22 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 184DC33EAD6; Wed, 5 Aug 2015 15:28:21 +0000 (UTC) Received: from blade.nx (ovpn-116-104.ams2.redhat.com [10.36.116.104]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t75FSJIQ030650; Wed, 5 Aug 2015 11:28:20 -0400 Received: from blade.nx (localhost [127.0.0.1]) by blade.nx (Postfix) with ESMTP id EA5C7264287; Wed, 5 Aug 2015 16:28:18 +0100 (BST) From: Gary Benson <gbenson@redhat.com> To: gdb-patches@sourceware.org Cc: Sandra Loosemore <sandra@codesourcery.com>, Doug Evans <dje@google.com>, Pedro Alves <palves@redhat.com>, Jan Kratochvil <jan.kratochvil@redhat.com>, =?UTF-8?q?Andr=C3=A9=20P=C3=B6nitz?= <apoenitz@t-online.de>, Paul_Koning@Dell.com Subject: [PATCH 2/2] Make remote file transfers interruptible Date: Wed, 5 Aug 2015 16:28:16 +0100 Message-Id: <1438788496-32246-3-git-send-email-gbenson@redhat.com> In-Reply-To: <1438788496-32246-1-git-send-email-gbenson@redhat.com> References: <1438788496-32246-1-git-send-email-gbenson@redhat.com> X-IsSubscribed: yes |
Commit Message
Gary Benson
Aug. 5, 2015, 3:28 p.m. UTC
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(-)
Comments
On 08/05/2015 09:28 AM, Gary Benson wrote: > This commit makes it possible to interrupt slow remote file transfers. > > gdb/ChangeLog: > > * gdb_bfd.c (gdb_bfd_iovec_fileio_pread): Add QUIT call. I think that this is the same patch that you sent earlier: https://sourceware.org/ml/gdb/2015-07/msg00043.html It still does not work for me. :-( -Sandra
Hi Sandra, Sandra Loosemore wrote: > On 08/05/2015 09:28 AM, Gary Benson wrote: > > This commit makes it possible to interrupt slow remote file transfers. > > > > gdb/ChangeLog: > > > > * gdb_bfd.c (gdb_bfd_iovec_fileio_pread): Add QUIT call. > > I think that this is the same patch that you sent earlier: > > https://sourceware.org/ml/gdb/2015-07/msg00043.html > > It still does not work for me. :-( Ok, given the packet-size limit of RSP I was assuming GDB would read the files in chunks the size of the server's packet buffer size (16k for gdbserver) but it seems that that chunking happens at a lower level, so the interrupt is only noticed between files rather than between chunks. I tested this patch using "remote get", but it seems that that operates differently. So I'm retracting this patch. Making remote transfers properly interruptible looks like a fairly involved task that's only slightly on my radar. I've filed a bug (https://sourceware.org/bugzilla/show_bug.cgi?id=18804) to keep the issue from being forgotten. I'll work on if I have some free time, or someone else can do it. The other patch in the series (the warning messages) can go in if people find it useful. Thanks, Gary
On 08/05/2015 04:28 PM, Gary Benson wrote: > This commit makes it possible to interrupt slow remote file transfers. > > gdb/ChangeLog: > > * gdb_bfd.c (gdb_bfd_iovec_fileio_pread): Add QUIT call. OK. Hopefully BFD doesn't get corrupted when an exception crosses it. If it does, then we'll need to catch all exceptions before returning to BFD, and return some "silently abort whatever you're doing" error. Thanks, Pedro Alves
Pedro Alves wrote: > On 08/05/2015 04:28 PM, Gary Benson wrote: > > This commit makes it possible to interrupt slow remote file transfers. > > > > gdb/ChangeLog: > > > > * gdb_bfd.c (gdb_bfd_iovec_fileio_pread): Add QUIT call. > > OK. > > Hopefully BFD doesn't get corrupted when an exception crosses it. > If it does, then we'll need to catch all exceptions before returning > to BFD, and return some "silently abort whatever you're doing" > error. Pushed to master and 7.10. Thanks, Gary
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);