JDK-4689395 : "step over" after a class is redefined acts like "step out"
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 1.4.0,1.4.1
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_8
  • CPU: generic,sparc
  • Submitted: 2002-05-22
  • Updated: 2003-04-12
  • Resolved: 2002-09-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
1.4.2 mantisFixed
Related Reports
Duplicate :  
Relates :  
After a class is redefined, subsequent jdb operation "next" (step over) acts like "step up" (return to a method's caller).

To reproduce;

1) Compile the following Java class:

public class Test {
    public static void main(String[] args) {
    public static void minor() {

2) Run 'jdb'.
3) Set a breakpoint on line with 'println("3")'.
4) Run the class inside 'jdb'.
5) When the breakpoint is hit, slightly modify source
   code of method 'minor()' (e.g. replace "1" with "10")
   and compile the class again.
6) Redefine the class in 'jdb'.
7) Perform operation 'next'.
'jdb' will perform 'step up' instead.

Output from 'jdb':

bash-2.03$ $HOPPER_HOME/bin/jdb
Initializing jdb ...
> stop in Test:12
Deferring breakpoint Test:12.
It will be set after the class is loaded.
> run Test
run  Test
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
VM Started: Set deferred breakpoint Test:12

Breakpoint hit: "thread=main", Test.minor(), line=12 bci=16
12            System.out.println("3");

main[1] redefine Test Test.class
main[1] next
> 3

Step completed: "thread=main", Test.main(), line=6 bci=11
6            System.out.println("--Z");

main[1] next
> --Z

Step completed: "thread=main", Test.main(), line=7 bci=19
7        }

main[1] next
The application exited

Tested on:
- RedHat Linux 7.1, JDK 1.4.1 beta
- Solaris 8, JDK 1.4.0
- Solaris 8, JDK 1.4.1 beta

###@###.### 2002-05-22

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis mantis-b02 FIXED IN: mantis mantis-b02 INTEGRATED IN: mantis mantis-b02

EVALUATION Problem is in the back end code which controls the STEP_LINE/STEP_OVER mechanism. When line number info is missing STEP_LINE/STEP_OVER was not enabling the stepping. So need to fix the logic in back end to enable stepping.