This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Cleanups and Exception handlers
- From: Doug Evans <dje at google dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: Phil Muldoon <pmuldoon at redhat dot com>, gdb <gdb at sourceware dot org>
- Date: Sat, 4 May 2013 10:52:04 -0700
- Subject: Re: Cleanups and Exception handlers
- References: <5180EE37 dot 3020507 at redhat dot com> <20130501152116 dot GA7529 at host2 dot jankratochvil dot net> <518162F2 dot 1000704 at redhat dot com> <20130501194430 dot GA16791 at host2 dot jankratochvil dot net>
On Wed, May 1, 2013 at 12:44 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> On Wed, 01 May 2013 20:46:10 +0200, Phil Muldoon wrote:
>> > It seemed to me that there were too many TRY_CATCH blocks even in cases where
>> > nothing can throw an exception.
>>
>> This is because most (though I have no audited all of them) calls to
>> ui_out_* use *_filtered function calls (at least when the output is
>> directed to the CLI). These can be interrupted from GDB and Python
>> has to handle the resulting GDB generated keyboard interruption
>> exception. It's a massive pain in the neck. ;)
>
> Oops, OK.
A comment in the code explaining why things are the way they are
would be most welcome.