This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: working around batch mode command errors


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> :-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]