This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA][patch 1/9] Yet another respin of the patch with initial Python support
- From: Daniel Jacobowitz <drow at false dot org>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: Thiago Jung Bauermann <bauerman at br dot ibm dot com>, tromey at redhat dot com, gdb-patches at sources dot redhat dot com
- Date: Mon, 4 Aug 2008 08:14:52 -0400
- Subject: Re: [RFA][patch 1/9] Yet another respin of the patch with initial Python support
- References: <1216245620.12209.18.camel@localhost.localdomain> <20080718195010.GA14356@caradoc.them.org> <1216653969.31797.6.camel@localhost.localdomain> <uwsj84wx5.fsf@gnu.org> <m3prp0efvr.fsf@fleche.redhat.com> <20080726173508.GA16470@caradoc.them.org> <m363qsee4r.fsf@fleche.redhat.com> <uej5g4frg.fsf@gnu.org> <1217818243.9336.7.camel@localhost.localdomain> <uhca1lb3k.fsf@gnu.org>
On Mon, Aug 04, 2008 at 06:20:47AM +0300, Eli Zaretskii wrote:
> I think what I suggested is still valid: no matter how the exception
> is caught, it will still terminate the current command, won't it?
> And, btw, do we actually have examples of such non-default exception
> handling in GDB?
About half the times that TRY_CATCH or catch_exception / catch_error
are used, we handle an exception in a more specific way. Some are for
cleanups, but many continue after e.g. a memory read error. The
current action is terminated, but the action may be just part of
a command.
For example, if we have a Python implementation of a shared library
list and the equivalent of current_sos throws an exception, that
should not abort a "continue" command.
For an example currently in GDB,
TRY_CATCH (e, RETURN_MASK_ALL)
{
bpstat_do_actions (&stop_bpstat);
}
The actions associated with a breakpoint may terminate themselves, but
not the surrounding command.
--
Daniel Jacobowitz
CodeSourcery