From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10249 invoked by alias); 9 Mar 2015 18:54:35 -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 10238 invoked by uid 89); 9 Mar 2015 18:54:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL autolearn=ham version=3.3.2 X-HELO: sasl.smtp.pobox.com Received: from pb-sasl1.int.icgroup.com (HELO sasl.smtp.pobox.com) (208.72.237.25) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Mar 2015 18:54:33 +0000 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id EDDC73C85B; Mon, 9 Mar 2015 14:54:31 -0400 (EDT) Received: from pb-sasl1.int.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id E65683C85A; Mon, 9 Mar 2015 14:54:31 -0400 (EDT) Received: from rusty (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id 14E6B3C859; Mon, 9 Mar 2015 14:54:30 -0400 (EDT) From: Andy Wingo To: Pedro Alves Cc: gdb-patches@sourceware.org, asmundak@google.com Subject: Re: [PATCH v2] Add Guile frame unwinder interface References: <87oao7wi66.fsf@igalia.com> <87zj7msbly.fsf@igalia.com> <54FDBF21.4090400@redhat.com> Date: Mon, 09 Mar 2015 18:54:00 -0000 In-Reply-To: <54FDBF21.4090400@redhat.com> (Pedro Alves's message of "Mon, 09 Mar 2015 15:41:21 +0000") Message-ID: <87pp8iq9wc.fsf@igalia.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: B8538372-C68D-11E4-BC20-B058D0B8C469-02397024!pb-sasl1.pobox.com X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00228.txt.bz2 Hi, On Mon 09 Mar 2015 16:41, Pedro Alves writes: > On 03/09/2015 10:34 AM, Andy Wingo wrote: >> +@var{register} names a register, and should be a string, for example >> +@samp{rip}. @var{value} is the register value, as a @value{GDBN} >> +value. Alternately, passing @code{#f} as the value will mark the >> +register as unavailable. > > From a glimpse over the code, I think this actually marks it as > "" (optimized out), right? That would be the correct > thing to do. Marking a register as "" is also possible, > but it is a different thing -- it means the value exists, but gdb > couln't get to it, because e.g., the core file is trimmed, or the > ptrace interface is missing access to some registers. > > That said, you may want to consider how you'd expand the API > to allow marking registers as unavailable. I didn't realize that "unavailable" and "not saved" were different things, thanks for the pointer. I guess given that the default is a "not saved" result, I can just document this default state, and that ephemeral-frame-add-saved-value! adds a value. We remove the #f case. If we need to support other states like "unavailable", we can add other API like ephemeral-frame-mark-unavailable! or similar. >> + is_unwinding = 1; >> TRY_CATCH (ex, RETURN_MASK_ERROR) >> { >> res = unwinder->sniffer (unwinder, this_frame, this_cache); >> } >> + is_unwinding = 0; > > Note that RETURN_MASK_ERROR does not catch all exceptions (notably, > a ctrl-c/QUIT passes right through uncaught). Ah indeed. I'll move the is_unwinding=1 to a cleanup inside the TRY_CATCH. Thanks for the review, Andy