From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93310 invoked by alias); 4 Nov 2019 15:46:58 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 93302 invoked by uid 89); 4 Nov 2019 15:46:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=H*M:1779, offer X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Nov 2019 15:46:56 +0000 Received: from [172.16.0.155] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id A408B1E4C2; Mon, 4 Nov 2019 10:46:54 -0500 (EST) Subject: Re: [RFC PATCH] Support debuginfo and source file fetching via debuginfo server To: "Frank Ch. Eigler" , Aaron Merey Cc: Tom Tromey , Christian Biesinger via gdb-patches , Christian Biesinger References: <20190820202809.25367-1-amerey@redhat.com> <87pnj6dl3k.fsf@tromey.com> <87sgn71ji6.fsf@tromey.com> <87lfsye5l5.fsf@redhat.com> <87bltrelab.fsf@redhat.com> From: Simon Marchi Message-ID: Date: Mon, 04 Nov 2019 15:46:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <87bltrelab.fsf@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-11/txt/msg00090.txt.bz2 On 2019-11-04 10:03 a.m., Frank Ch. Eigler wrote: > fche@redhat.com (Frank Ch. Eigler) writes: > >> Actually we can probably do even better: trap the SIGINT ourselves in >> libdebuginfod, but upon return to gdb with an -EINTR, the caller can >> call set_quit_flag(). Then the rest of gdb can react the normal way. > > Actually2, prototyped a solution whereby the library temporarily hijacks > SIGINT to interrupt its ongoing transfers, then raises a SIGINT back to > gdb or other caller upon return. If this works, then no changes at all > are required to the gdb/libdebuginfod interface code. > > - FChe > I haven't followed this thread closely, so it might be an obvious "no", but I was wondering if the library could offer to install a callback that is call relatively often, allowing GDB to interrupt the operation if it returns a certain value. GDB would check its quit_flag in there. I would find that cleaner and easier to understand than having the main program and libraries competing for the same signal handler. At the same time, that callback would be used to report progress, and GDB could display a nice progress bar! Simon