This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] PR python/12438
- From: Tom Tromey <tromey at redhat dot com>
- To: Kevin Pouget <kevin dot pouget at gmail dot com>
- Cc: pmuldoon at redhat dot com, gdb-patches at sourceware dot org
- Date: Wed, 19 Oct 2011 14:56:11 -0600
- Subject: Re: [patch] PR python/12438
- References: <m31uyblkwj.fsf@redhat.com> <CAPftXULe+rz_KdjYCjyNE3u0RVJg6yL4hV300WXO+khA49zG1w@mail.gmail.com>
Kevin> I have a question regarding this patch, which was committed at
Kevin> the end of June, wouldn't GDB let the user know, one way or an
Kevin> other, that there was something wrong happened ?
I think gdbpy_print_stack is mostly called in "internal" situations,
where printing something will mess up the output.
Ordinary commands and such that fail should convert the Python exception
to a gdb exception, leading to what you'd expect.
I might be misremembering. Concrete examples would help.
Kevin> I don't know if Python allows to do it, but i think it would be nice
Kevin> to see something like:
>> NameError: global name 'comp' is not define
Kevin> which is the last line of a python stacktrace
I think it could be done.
We can always add more values for "maint set python print-stack".
Tom