From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19907 invoked by alias); 6 Oct 2011 13:23:18 -0000 Received: (qmail 19779 invoked by uid 22791); 6 Oct 2011 13:23:16 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ausxippc101.us.dell.com (HELO ausxippc101.us.dell.com) (143.166.85.207) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 06 Oct 2011 13:22:59 +0000 X-Loopcount0: from 10.175.216.250 From: To: , Date: Thu, 06 Oct 2011 13:23:00 -0000 Subject: RE: [python] [patch] PR 13624 Message-ID: <09787EF419216C41A903FD14EE5506DD030A67EFC1@AUSX7MCPC103.AMER.DELL.COM> References: In-Reply-To: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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/msg00153.txt.bz2 Could you make the new exception be a more explicit Pythonic one? TypeErro= r seems like the natural fit. paul -----Original Message----- From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware= .org] On Behalf Of Phil Muldoon Sent: Thursday, October 06, 2011 8:49 AM To: gdb-patches@sourceware.org Subject: [python] [patch] PR 13624 The patch address PR 13624 which noted that in some instances we were not c= atching GDB exceptions. I checked every function and I found two GDB cases= , and one Python case. OK? Cheers, Phil -- 2011-10-06 Phil Muldoon * python/py-value.c (valpy_call): Check that arguments are a tuple. (valpy_nonzero): Catch GDB exceptions. (valpy_absolute): Ditto. -- diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c index 252d9b9..4= 8bbb0a 100644 --- a/gdb/python/py-value.c +++ b/gdb/python/py-value.c @@ -519,6 +519,13 @@ valpy_call (PyObject *self, PyObject *args, PyObject *= keywords) return NULL; } =20 + if (! PyTuple_Check (args)) + { + PyErr_SetString (PyExc_RuntimeError, + _("Inferior arguments must be provided in a tuple.")); + return NULL; + } + ...