Debug: JDB resume command does not continue execution
JDB suspend and resume actions are not truly symmetrical.
For example:
Debug any class that does NOT have a System.exit() call.
Here is an example testcase:
public class AnyClass {
public static void main( String [] args ) {
System.out.println( "main begin" );
System.out.println( "main done" );
}
}
1) jdb AnyClass
2) stop in AnyClass.main
jdb replies: Breakpoint set in AnyClass.main
3) run
jdb replies: Breakpoint hit:
4) suspend
jdb replies: All (non-system) threads suspended.
5) resume
jdb replies:
All threads resumed.
main begin
main done
6) continue
jdb replies: AnyClass exited
If you repeat this scenario without the suspend/resume you get:
1) jdb AnyClass
2) stop in AnyClass.main
jdb replies: Breakpoint set in AnyClass.main
3) run
jdb replies: Breakpoint hit:
4) continue
jdb replies:
main begin
main done
AnyClass exited
It seems that either the resume should not run the main,
or the resume should run the main and do a continue
int order to exit the class.
This appears to be the case on Win 32
JDB suspend and resume actions are not truly symmetrical.
For example:
Debug any class that does NOT have a System.exit() call.
Here is an example testcase:
public class AnyClass {
public static void main( String [] args ) {
System.out.println( "main begin" );
System.out.println( "main done" );
}
}
1) jdb AnyClass
2) stop in AnyClass.main
jdb replies: Breakpoint set in AnyClass.main
3) run
jdb replies: Breakpoint hit:
4) suspend
jdb replies: All (non-system) threads suspended.
5) resume
jdb replies:
All threads resumed.
main begin
main done
6) continue
jdb replies: AnyClass exited
If you repeat this scenario without the suspend/resume you get:
1) jdb AnyClass
2) stop in AnyClass.main
jdb replies: Breakpoint set in AnyClass.main
3) run
jdb replies: Breakpoint hit:
4) continue
jdb replies:
main begin
main done
AnyClass exited
It seems that either the resume should not run the main,
or the resume should run the main and do a continue
int order to exit the class.
This appears to be the case on Win 32