From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10048 invoked by alias); 28 Jun 2010 21:35:13 -0000 Received: (qmail 10037 invoked by uid 22791); 28 Jun 2010 21:35:12 -0000 X-SWARE-Spam-Status: No, hits=-5.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 28 Jun 2010 21:35:05 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5SLZ4eZ032733 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 28 Jun 2010 17:35:04 -0400 Received: from Phil-THINK.home (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5SLZ3ju010761; Mon, 28 Jun 2010 17:35:03 -0400 Message-ID: <4C291586.5050302@redhat.com> Date: Mon, 28 Jun 2010 21:35:00 -0000 From: Phil Muldoon User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Thunderbird/3.0.5 MIME-Version: 1.0 To: tromey@redhat.com CC: gdb-patches ml Subject: Re: [python][patch] Inferior and Thread information support. References: <4BFA6E82.3070704@redhat.com> <4C1B16BF.3040000@redhat.com> <4C209107.9010800@redhat.com> <4C2869BB.3050304@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 2010-06/txt/msg00665.txt.bz2 On 28/06/10 20:51, Tom Tromey wrote: >>>>>> "Phil" == Phil Muldoon writes: > Phil> + if (!thread_obj) > Phil> + { > Phil> + warning (_("Cannot create Python InferiorThread object.")); > Phil> + gdbpy_print_stack (); > Phil> + do_cleanups (cleanup); > > Tom> I don't think there is any need for a warning here. > Tom> The exception should suffice. > > Phil> OK > > Actually I meant that you should remove the call to warning but leave in > the gdbpy_print_stack. Ok, thanks. > The new code looks like this: > > Phil> + if (except.reason < 0) > Phil> + { > Phil> + do_cleanups (cleanups); > Phil> + return PyErr_Format (PyExc_RuntimeError, "%s", except.message); > Phil> + } > > ... but this does the wrong thing for RETURN_QUIT. > Instead I think you should do > > if (except.reason < 0) > { > do_cleanups ...; > GDB_PY_HANDLE_EXCEPTION (...); > } > > This is a little redundant but it will do the right thing -- and will > continue to do so if we ever split the different kinds of gdb > exceptions into different Python exceptions. Ok, makes sense. > This patch is ok with those changes. Thanks for persevering. And so committed with those changes. http://sourceware.org/ml/gdb-cvs/2010-06/msg00200.html And thank-you and all the other commentators for their guidance on this Python API. This is the last major Python API patch from Archer. It's been fun getting these features into FSF GDB. Cheers, Phil