This is the mail archive of the gdb-patches@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: [RFA][patch 1/9] Yet another respin of the patch with initial Python support


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


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