This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: working around batch mode command errors
- From: Doug Evans <dje at google dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Pedro Alves <palves at redhat dot com>, "Maucci, Cyrille" <cyrille dot maucci at hp dot com>, "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Thu, 1 Nov 2012 13:30:43 -0700
- Subject: Re: working around batch mode command errors
- References: <7D0928B9A8397D4B9E2F9E5FFFB8D860027BED37@G6W2492.americas.hpqcorp.net> <509010B5.6050309@redhat.com> <87390vyhxq.fsf@fleche.redhat.com>
On Tue, Oct 30, 2012 at 10:43 AM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>
> Pedro> There's no try/catch mechanism in the CLI unfortunately, but I
> Pedro> think you could come up with one in python gdb. ISTR Tromey had
> Pedro> a python command wrapper that swallows CLI errors?
>
> Yeah, http://www.sourceware.org/ml/gdb/2010-06/msg00100.html
>
> There's a more full-blown try/catch implementation in bugzilla.
> That one isn't in Python. I don't know why it never went in.
>
> This seems to be a frequently requested feature.
>
> Tom
I went looking for the bugzilla entry but couldn't find it.
try:
gdb.execute (...)
except:
pass
is just too much to type.
</sarcasm> :-)