jdk/test/com/sun/jdi/JdbMethodExitTest.sh
changeset 21602 85bdffaf5e5d
parent 5506 202f599c92aa
child 23046 0b0407b1e2a5
--- a/jdk/test/com/sun/jdi/JdbMethodExitTest.sh	Fri Nov 01 10:08:10 2013 +0100
+++ b/jdk/test/com/sun/jdi/JdbMethodExitTest.sh	Fri Nov 01 15:10:10 2013 +0100
@@ -156,7 +156,7 @@
         // a resume.
 
         $classname xx = new $classname();
-        
+        System.out.println("threadid="+Thread.currentThread().getId());
         bkpt();
 
         // test all possible return types
@@ -197,6 +197,8 @@
 
     # test all possible return types
     runToBkpt @1
+    debuggeeMatchRegexp "s/threadid=\(.*\)/\1/g"
+    threadid=$?
     cmd untrace
 
     cmd trace methods
@@ -226,7 +228,7 @@
 
     # trace exit of methods with all the return values
     # (but just check a couple of them)
-    cmd trace go exits
+    cmd trace go method exits $threadid
     cmd cont
     jdbFailIfNotPresent "instance of JdbMethodExitTest"
     jdbFailIfNotPresent "return value = 8"
@@ -235,7 +237,7 @@
     cmd step up
 
 
-    cmd trace methods
+    cmd trace methods $threadid
     cmd cont
     jdbFailIfNotPresent "Method entered:"
     cmd cont
@@ -243,7 +245,9 @@
     cmd step up
 
 
-    cmd trace go methods
+    cmd trace go methods $threadid
+    cmd cont
+    cmd cont
     cmd cont
     jdbFailIfNotPresent "Method entered: \"thread=main\", JdbMethodExitTest.traceMethods1"
     jdbFailIfNotPresent 'Method exited: .* JdbMethodExitTest.traceMethods1'
@@ -251,14 +255,14 @@
     cmd step up
     
 
-    cmd trace method exits
+    cmd trace method exits $threadid
     cmd cont
     jdbFailIfNotPresent "Method exited: return value = \"traceExits\""
     cmd untrace
     cmd step up
 
 
-    cmd trace go method exits
+    cmd trace go method exits $threadid
     cmd cont
     jdbFailIfNotPresent 'Method exited: .* JdbMethodExitTest.traceExits1'
     cmd untrace
@@ -266,7 +270,7 @@
 
 
     cmd step            # step into traceExit()
-    cmd trace method exit
+    cmd trace method exit $threadid
     cmd cont
     jdbFailIfNotPresent "Method exited: return value = \"traceExit\""
     cmd untrace
@@ -275,7 +279,7 @@
 
     cmd step
     cmd step           # skip over setting return value in caller :-(
-    cmd trace go method exit
+    cmd trace go method exit $threadid
     cmd cont
     jdbFailIfNotPresent 'Method exited: .*JdbMethodExitTest.traceExit1'
     cmd quit