From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18728 invoked by alias); 25 Oct 2011 12:22:24 -0000 Received: (qmail 18716 invoked by uid 22791); 25 Oct 2011 12:22:22 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 25 Oct 2011 12:22:05 +0000 Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RIg16-0003sn-2C; Tue, 25 Oct 2011 08:22:04 -0400 Date: Tue, 25 Oct 2011 12:49:00 -0000 Message-Id: From: Eli Zaretskii To: Kevin Pouget CC: pedro@codesourcery.com, pmuldoon@redhat.com, gdb-patches@sourceware.org, tromey@redhat.com In-reply-to: (message from Kevin Pouget on Tue, 25 Oct 2011 09:20:19 +0200) Subject: Re: [RFC][Python] gdbpy_frame_stop_reason_string bug Reply-to: Eli Zaretskii References: <201110141600.20561.pedro@codesourcery.com> <8339eie2ij.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes 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 X-SW-Source: 2011-10/txt/msg00654.txt.bz2 > From: Kevin Pouget > Date: Tue, 25 Oct 2011 09:20:19 +0200 > Cc: pedro@codesourcery.com, pmuldoon@redhat.com, gdb-patches@sourceware.org, > tromey@redhat.com > > >> +@item gdb.FRAME_UNWIND_FIRST_ERROR > >> +All the conditions after this alias are considered errors; > > > > Hmm...  This table is preceded by this text: > > > >  @defun Frame.unwind_stop_reason () > >  Return an integer representing the reason why it's not possible to find > >  more frames toward the outermost frame.  Use > >  @code{gdb.frame_stop_reason_string} to convert the value returned by this > >  function to a string. The value can be one of: > > > > So "conditions after this alias" seems inappropriate in the list that > > follows, because we are not describing conditions or aliases.  Can you > > rephrase this to be consistent with the rest of the list. > > I'm not sure about you see wrong with "alias". We could replace it > with "reference" (like the & operator in C++, but also used in Python > and Java), but it sounds more or less the same to me. > > What do you think about: > "Stop reasons greater or equal to this value/alias/reference" Now that I understand the intent, I would suggest Any stop reason greater or equal to this value indicates some kind of error. This special value facilitates writing code that tests for errors in unwinding in a way that will work correctly even if the list of the other values is modified in future @value{GDBN} versions. Using it, you could write: @smallexample ... insert here a snippet of code using this value ... @end smallexample > > And why is it important that the value is an alias for another? > > it's important because it's not a distinct value as the other ones, so > > frame_stop_reason_string(UNWIND_FIRST_ERROR) == frame_stop_reason_string(UNWIND_UNAVAILABLE) > is True, which might be counter-intuitive if you don't know that > UNWIND_FIRST_ERROR is an alias/reference I still don't see the importance, sorry. Moreover, having this text means that we will need to update the manual each time the list of unwind reasons is modified, which in a way works against this very feature. Thanks.