From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20223 invoked by alias); 14 Oct 2011 15:00:42 -0000 Received: (qmail 20210 invoked by uid 22791); 14 Oct 2011 15:00:39 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 14 Oct 2011 15:00:25 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1REjFI-0005A7-46 from pedro_alves@mentor.com ; Fri, 14 Oct 2011 08:00:24 -0700 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 14 Oct 2011 16:00:22 +0100 From: Pedro Alves To: Kevin Pouget Subject: Re: [RFC][Python] gdbpy_frame_stop_reason_string bug Date: Fri, 14 Oct 2011 15:00:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-11-generic; KDE/4.7.1; x86_64; ; ) Cc: Tom Tromey , pmuldoon@redhat.com, gdb-patches@sourceware.org References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201110141600.20561.pedro@codesourcery.com> 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/msg00415.txt.bz2 On Friday 14 October 2011 15:40:49, Kevin Pouget wrote: > 2011-10-14 Kevin Pouget > > * frame.c (frame_stop_reason_string): Rewrite using > unwind_stop_reasons.def. > * frame.h (enum unwind_stop_reason): Likewise. > * python/py-frame.c (gdbpy_initialize_frames): Likewise. > (gdbpy_frame_stop_reason_string): Use new enum unwind_stop_reason > constants for bound-checking. > * unwind_stop_reasons.def: New file. > You're missing this change that was in my patch: Index: src/gdb/stack.c =================================================================== --- src.orig/gdb/stack.c 2011-10-11 12:43:20.000000000 +0100 +++ src/gdb/stack.c 2011-10-12 15:38:23.083658404 +0100 @@ -1625,7 +1625,7 @@ backtrace_command_1 (char *count_exp, in enum unwind_stop_reason reason; reason = get_frame_unwind_stop_reason (trailing); - if (reason > UNWIND_FIRST_ERROR) + if (reason >= UNWIND_FIRST_ERROR) printf_filtered (_("Backtrace stopped: %s\n"), frame_stop_reason_string (reason)); } because before, UNWIND_FIRST_ERROR was not an alias, now it is. I notice only these two descriptions are capitalized: > +SET (UNWIND_NO_REASON, "No reason") > +SET (UNWIND_UNAVAILABLE, "Not enough registers or memory available to unwind further") (the latter my fault). Can you lowercase them too for consistency? Also, I believe as is, we lose gdb.FRAME_UNWIND_FIRST_ERROR? -- Pedro Alves