Bug 1704 - Investigate option to step filter synthetic methods (1GJOTQZ)
Summary: Investigate option to step filter synthetic methods (1GJOTQZ)
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:17 EDT by Joe Szurszewski CLA
Modified: 2001-10-31 15: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 Joe Szurszewski CLA 2001-10-10 22:17:55 EDT
JGS (9/7/01 9:42:36 AM)
	JDI does not appear to support this, so we'd need to fake it on the client.

JGS (9/10/01 11:28:58 AM)
	What happens when we step into a synthetic method?  Does the debugger 
	keep performing 'step intos' until we get to a non-synthetic method?  Similar
	question for 'step return', does the debugger keep performing 'step returns'
	until no longer in a synthetic method?  And also step overs, since you could
	step over out of a method and back into a synthetic one.  

JGS (9/13/01 2:44:21 PM)
	Will investigate how regular step filtering handles the following situation:
		-	Method 'a' in class 'A' calls method 'b' in class 'B'
		-	Method 'b' in class 'B' calls method 'c' in class 'C'
		-	Set breakpoint in 'a' on call to 'b'
		-	Set step filters such that only B is filtered
		-	When suspended at breakpoint, step in, what happens?
			-	2 choices: 	(1) Acts like a step over, or 
									(2) we suspend in 'c'

	Results of this experiment should guide us on how to handle filtering synthetic methods.
	If answer is (1), this is relatively straightforward to implement in client.  If it's (2), this is
	much more involved.

JGS (9/13/01 3:45:45 PM)
	It appears the answer is (2).

DW (9/24/2001 3:59:05 PM)
	I think the logic is something like this:
		* User does a stepX (over/into/return)
		* If the resulting suspend location is a synthetic method, and the filter is on
			do another stepX 

	This will get the desired behavior of moving from A to B, and evenutally stepping into C.
	I also manually insured that stepping "into" will eventually return to B (i.e. if there is nothing
	to "step into", the result is a "step over").

JGS (10/2/01 11:18:12 AM)
	Also want to add ability to filter stepping into static initializers.  This should be similar
	to filtering synthetic methods.

JGS (10/2/01 11:26:08 AM)
		Maybe also consider option to filter constructors.

JGS (10/2/01 1:10:36 PM)
	Wait until after refactoring of step handling in JDIThread.
Comment 1 Joe Szurszewski CLA 2001-10-25 10:41:40 EDT
JDI supplies the "isSynthetic()" method we can use to implement this feature, 
however, it appears that none of: [IBM, Sun 1.2.2, Sun 1.3.0, Sun 1.4beta, J9] 
VMs support this feature, as indicated by their return values for 
the "canGetSyntheticAttribute()" call on VirtualMachine.  Can implement this 
feature for very little extra work on top of implementing filtering static 
initializers (which all VMs support), then just wait for VM support.
Comment 2 Joe Szurszewski CLA 2001-10-29 18:58:48 EST
Implemented infrastructure to handle synthetic method filtering, very similar 
to the infrastructure for static initializer filtering, but synthetic filtering 
cannot be tested, since there doesn't seem to be a VM that supports it at 
present.  
Comment 3 Joe Szurszewski CLA 2001-10-29 18:59:00 EST
Fixed.
Comment 4 Darin Wright CLA 2001-10-31 15:09:18 EST
Verified.