[m-rev.] for review: exception events for ssdebug
Julien Fischer
juliensf at csse.unimelb.edu.au
Tue Jun 1 15:37:50 AEST 2010
On Tue, 1 Jun 2010, Peter Wang wrote:
> Branches: main, 10.04
>
> Add a form of exception events in the source-to-source debugger for Java
> grades. This could be implemented for other backends later.
>
> Unlike in mdb, where throwing an exception will generate EXCP events for all
> calls on the stack up to enclosing exception handler, we only generate a single
> EXCP event for the call to `exception.throw_impl'. The next event will be the
> EXIT of the procedure which caught the exception, i.e. exception.try*.
>
> library/exception.m:
> Add hooks in the Java implementations of throw_impl and catch_impl.
> These do nothing until overridden by ssdb.m.
>
> Replace an unused mode of catch_impl by a stub.
>
> ssdb/ssdb.m:
> Install the hooks in the exception module.
>
> When exception.throw_impl is called, emulate an exception event.
>
> Remember the CSN at the start of a call to exception.catch_impl.
> When an exception is caught, pop off any shadow stack frames between
> the throw and the catch.
>
> Add an `exception' command that stops at the next exception event.
>
> Make the `finish' command handle exceptions. When an exception is
> thrown, stop immediately unless we know that further up the stack is an
> exception handler which will handle the exception before we reach the
> final port that we wish to stop at.
That looks fine.
Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list