Bug 172027 - "all methods" method breakpoint does not stop on the same lines in jdk 1.5 and 1.6
"all methods" method breakpoint does not stop on the same lines in jdk 1.5 an...
Status: VERIFIED FIXED
Product: debugger
Classification: Unclassified
Component: Java
6.x
All Linux
: P3 (vote)
: 6.x
Assigned To: Daniel Prusa
issues@debugger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-11 12:42 UTC by Vojtech Sigler
Modified: 2009-10-12 08:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
Test project to reproduce the testcase (open file MemoryView.java) (14.56 KB, application/octet-stream)
2009-09-11 13:04 UTC, Vojtech Sigler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vojtech Sigler 2009-09-11 12:42:51 UTC
Product Version: NetBeans IDE Dev (Build 200909081533)
Java: 1.5.0_20-rev; Java HotSpot(TM) Client VM 1.5.0_20-rev-b03
System: Linux version 2.6.28-15-generic running on i386; UTF-8; en_US (nb)

And jdk 1.6.0_16

1) Open attached source file
2) Put cursor on line 37
3) Invoke New Breakpoint
4) select Method breakpoint (all methods of given class checkbox is selected)
5) confirm breakpoint and debug file
6) invoke Continue several times

In JDK 1.6 the debugger stops (among others) on line 32 (public class MemoryView extends Helper { ), but in jdk 1.5 it
does not stop on this line.
Comment 1 Vojtech Sigler 2009-09-11 13:04:04 UTC
Created attachment 87500 [details]
Test project to reproduce the testcase (open file MemoryView.java)
Comment 2 Daniel Prusa 2009-10-01 15:01:47 UTC
When the attached project is compiled using jdk 1.6, the compiler adds so called "bridge method" in MemoryView class. It
is a synthetic method which delegates to 'test' method in Helper super class.
I do not know, why the bridge method is generated in this case, it should be related to generics only. I would also
expect that jdk 1.5 and jdk 1.6 produce the same bridge methods, so I do not know why there is a difference.
Nevertheless, it is unwanted and confusing to stop in such methods (the current line does not appear in method 'test',
but rather at MemoryView class declaration, line 32). I have added a check that excludes bridge methods to be targets of
"stop in all methods" method breakpoint.

http://hg.netbeans.org/main/rev/9c9500c96998
Comment 3 Quality Engineering 2009-10-09 22:57:24 UTC
Integrated into 'main-golden', will be available in build *200910091401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/9c9500c96998
User: Daniel Prusa <dprusa@netbeans.org>
Log: #172027: "all methods" method breakpoint does not stop on the same lines in jdk 1.5 and 1.6
Comment 4 Vojtech Sigler 2009-10-12 08:29:02 UTC
Verified in trunk build (200910100201).


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo