From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19311 invoked by alias); 13 Oct 2011 11:25:23 -0000 Received: (qmail 19299 invoked by uid 22791); 13 Oct 2011 11:25:22 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-vw0-f41.google.com (HELO mail-vw0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 13 Oct 2011 11:25:07 +0000 Received: by vws16 with SMTP id 16so1772841vws.0 for ; Thu, 13 Oct 2011 04:25:05 -0700 (PDT) Received: by 10.52.92.212 with SMTP id co20mr3254334vdb.119.1318505105339; Thu, 13 Oct 2011 04:25:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.180.75 with HTTP; Thu, 13 Oct 2011 04:24:45 -0700 (PDT) In-Reply-To: References: <201110121659.13715.pedro@codesourcery.com> From: Kevin Pouget Date: Thu, 13 Oct 2011 11:25:00 -0000 Message-ID: Subject: Re: [RFC][Python] gdbpy_frame_stop_reason_string bug To: Tom Tromey , Pedro Alves Cc: pmuldoon@redhat.com, gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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/msg00384.txt.bz2 On Wed, Oct 12, 2011 at 7:06 PM, Tom Tromey wrote: >>>>>> "Pedro" =3D=3D Pedro Alves writes: > > Pedro> We should definitely reimplement these enums in a table in a > Pedro> .def file. =A0That's 2 places already that map the enums to > Pedro> something else. =A0This one is missing UNWIND_UNAVAILABLE. > > Makes sense to me. > > Pedro> And what do you think of making UNWIND_FIRST_ERROR > Pedro> an alias like in my patch? =A0Do you think that's likely > Pedro> to break anything? > > I think it would be fine. Hello, here is a patch which implements the enums in a .def file, as suggested earlier. Please let me know what you think about it (tested with no regression on X86_64) UNWIND_FIRST_ERROR is now an "enum alias", instead of being defined by the preprocessor (the only way I managed to implement it), as well as UNWIND_FIRST and UNWIND_LAST, used for bound-checking in py-frame.c I also moved the original enum comments to the .def file with no modificati= on Thanks, Kevin