Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4108175

STD: JDB resume command does not continue execution

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.3.0
    • 1.2.0
    • core-svc
    • beta
    • sparc
    • solaris_2.5
    • Not verified

      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

            ghirschsunw Gordon Hirsch (Inactive)
            miflemi Mick Fleming
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: