This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] PR python/12438
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: Kevin Pouget <kevin dot pouget at gmail dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, gdb-patches at sourceware dot org
- Date: Mon, 17 Oct 2011 14:21:33 +0100
- Subject: Re: [patch] PR python/12438
- References: <m31uyblkwj.fsf@redhat.com> <CAPftXULe+rz_KdjYCjyNE3u0RVJg6yL4hV300WXO+khA49zG1w@mail.gmail.com>
- Reply-to: pmuldoon at redhat dot com
Kevin Pouget <kevin.pouget@gmail.com> writes:
> On Thu, Jun 30, 2011 at 11:37 AM, Phil Muldoon <pmuldoon@redhat.com> wrote:
>>
>> This patch addresses bug PR python/12438. ÂMark - and other users - have
>> asked that maint set python print-stack is off by default. ÂThis makes
>> sense to me, as while stack-traces are useful, they can impact
>> readability of GDB output. ÂPython developers can always turn it back 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