Bug 31655 - Cannot see variables in MethodVerifier
Summary: Cannot see variables in MethodVerifier
Status: RESOLVED DUPLICATE of bug 30971
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-12 08:29 EST by Philipe Mulet CLA
Modified: 2003-02-12 09:59 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 Philipe Mulet CLA 2003-02-12 08:29:35 EST
Build 20030211(take2)

When placing a breakpoint in MethodVerifier.checkMethods(), debugger will hit 
it, but refuse to display local variables.

Steps:
- sources for JDT/Core (from same build)
- put breakpoint in MethodVerifier#checkMethod (first line)
- create Java project to launch Java compiler: 
   - create Java project 'BatchCompile'
   - add org.eclipse.jdt.core on its classpath
   - define Compile.java type with following contents:
[import org.eclipse.jdt.internal.compiler.batch.Main;
import org.eclipse.jdt.internal.compiler.util.Util;

public class Compile {

	public static void main(String[] args) {

 		Main.compile(
		
	"d:/eclipse/workspaces/dev2.0/plugins/BatchCompile/src/X.java "
			+ " -1.4 -source 1.4 -preserveAllLocals -
warn:unusedArgument "
			+ " -cp d:/jdk1.4.1/jre/lib/rt.jar "
			+ " -d 
d:/eclipse/workspaces/dev2.0/plugins/BatchCompile/bin"
			+ " -verbose");]

   - note that path to X.java and rt.jar may need to be adjusted.
- add unit X.java with contents:
[
public class X {
	{
		new SomeInterface(){
			public void foo(int someParamX$1){}
		};
	}	
}

interface SomeInterface {
	void foo(int someParam);
}]

- run 'Compile' as a Java application in debug mode against JRE 1.4.1

Once the breakpoint is hit, no variable is available.
Comment 1 Philipe Mulet CLA 2003-02-12 08:30:16 EST
Olivier - could you pls double check that our dbg attributes are ok ?
Comment 2 Philipe Mulet CLA 2003-02-12 08:33:20 EST
My Java settings were: compiler 1.4 compliant, but source level 1.3 and target 
level 1.1.
Comment 3 Philipe Mulet CLA 2003-02-12 08:36:12 EST
Tried compiler 1.4 and default souce/target (1.4/1.2). Didn't change the 
behavior.
Comment 4 Philipe Mulet CLA 2003-02-12 08:36:55 EST
MethodVerifier from HEAD reproduces it.
Comment 5 Philipe Mulet CLA 2003-02-12 08:38:04 EST
Default 1.3 compliant mode also reproduces it.
Comment 6 Philipe Mulet CLA 2003-02-12 08:40:05 EST
None of the methods in the stackframe provide any variable information. I 
highly doubt we would be misgenerating all their attributes.

Comment 7 Philipe Mulet CLA 2003-02-12 08:46:04 EST
Using JRE 1.3.1 (Sun) did not change the behavior either.
Nothing is reported in the .log.
Comment 8 Philipe Mulet CLA 2003-02-12 09:24:45 EST
Olivier - ignore my previous comment about verifying our attributes. This is a 
known debugger issue.

When closing Debug view, and resetting perspective, it did the trick.
I thought this defect had been fixed in this build though...
Comment 9 Olivier Thomann CLA 2003-02-12 09:30:04 EST
I just finished to build my self-hosting workspace to investigate the problem...
Comment 10 Darin Wright CLA 2003-02-12 09:59:00 EST

*** This bug has been marked as a duplicate of 30971 ***