From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4995 invoked by alias); 17 Oct 2011 13:22:03 -0000 Received: (qmail 4983 invoked by uid 22791); 17 Oct 2011 13:22:02 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS 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, 17 Oct 2011 13:21:36 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9HDLZiS009564 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 17 Oct 2011 09:21:35 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p9HDLX8A025245; Mon, 17 Oct 2011 09:21:34 -0400 From: Phil Muldoon To: Kevin Pouget Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [patch] PR python/12438 References: Reply-to: pmuldoon@redhat.com X-URL: http://www.redhat.com Date: Mon, 17 Oct 2011 13:49:00 -0000 In-Reply-To: (Kevin Pouget's message of "Mon, 17 Oct 2011 14:49:02 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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/msg00464.txt.bz2 Kevin Pouget writes: > On Thu, Jun 30, 2011 at 11:37 AM, Phil Muldoon wrot= e: >> >> This patch addresses bug PR python/12438. =C2=A0Mark - and other users -= have >> asked that maint set python print-stack is off by default. =C2=A0This ma= kes >> sense to me, as while stack-traces are useful, they can impact >> readability of GDB output. =C2=A0Python developers can always turn it ba= ck on >> again. > > Hello, > > I have a question regarding this patch, which was committed at the end of= June, > wouldn't GDB let the user know, one way or an other, that there was > something wrong happened ? > > when you run a command, and see to "warning/error" message, you expect > that everything went right, but that's not true when this flag is set, > is it? > > I don't know if Python allows to do it, but i think it would be nice > to see something like: > >> NameError: global name 'comp' is not define > > which is the last line of a python stacktrace It was set that way so that "shipped" versions of GDB would not have endless amounts of exceptions when pretty-printing. However I too have begun to have second thoughts. I do multiple builds, and, inevitably, I forget to turn error-printing back on, so that really throws me sometimes. Fortunately, the should-print/should-not-print and the resultant exception printing code is located centrally. I think your idea is a good one, though I am trying to decide how useful that information would be, and if something additional brief data should be printed. Cheers, Phil