Bug 367508 - Show Exception Object in Variables Window when in Finally Block
Summary: Show Exception Object in Variables Window when in Finally Block
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.8   Edit
Hardware: PC Windows 7
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-23 12:09 EST by Nathan Reynolds CLA
Modified: 2011-12-23 12:09 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Reynolds CLA 2011-12-23 12:09:16 EST
Build Identifier: 20110916-0149

A finally block can be executed because of an exception being thrown in the try block.  When this happens, it would help to see the exception object in the Variables debugger window.  Thus, one could look at the exception message as well as inspect the call stack at the time of the exception.

Last time I checked the byte code of how a finally block is implemented, I found two copies of the finally block.  A copy for each of the normal and exception exits.  The exception copy pushes the exception object on to the stack, executes the code, and then pops the exception object from the stack and throws it.  The debugger would have to get the exception object from the stack.

My memory is now sketchy.  But, I think the stack is cleared at the beginning
of the finally block.  So, the exception object should be at the top of the
stack in the first slot.

Reproducible: Always