equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 package nsk.jdi.EventQueue.remove_l; |
24 package nsk.jdi.EventQueue.remove_l; |
25 |
25 |
|
26 import jdk.test.lib.Utils; |
26 import nsk.share.*; |
27 import nsk.share.*; |
27 import nsk.share.jpda.*; |
28 import nsk.share.jpda.*; |
28 import nsk.share.jdi.*; |
29 import nsk.share.jdi.*; |
29 |
30 |
30 /** |
31 /** |
61 // static int continue = 2; |
62 // static int continue = 2; |
62 static int maxInstr = 1; // 2; |
63 static int maxInstr = 1; // 2; |
63 |
64 |
64 static int lineForComm = 2; |
65 static int lineForComm = 2; |
65 |
66 |
|
67 // Used for communication between debugger and debuggee |
|
68 static volatile boolean stopSleeping = false; |
|
69 |
|
70 // Used by debugger to set stopSleeping flag to true |
|
71 static final boolean BOOLEAN_TRUE_VALUE = true; |
|
72 |
66 private static void methodForCommunication() { |
73 private static void methodForCommunication() { |
67 int i1 = instruction; |
74 int i1 = instruction; |
68 int i2 = i1; |
75 int i2 = i1; |
69 int i3 = i2; |
76 int i3 = i2; |
70 } |
77 } |
95 |
102 |
96 case 0: |
103 case 0: |
97 log1("before: methodForCommunication();"); |
104 log1("before: methodForCommunication();"); |
98 methodForCommunication(); |
105 methodForCommunication(); |
99 log1("before: Thread.sleep"); |
106 log1("before: Thread.sleep"); |
100 try { |
107 Utils.waitForCondition( |
101 Thread.sleep(argHandler.getWaitTime()*90000); |
108 () -> { |
102 } catch (InterruptedException e) { |
109 return stopSleeping; |
103 } |
110 }, |
|
111 Utils.adjustTimeout(argHandler.getWaitTime() * 10000), |
|
112 100); |
104 log1("after: Thread.sleep"); |
113 log1("after: Thread.sleep"); |
105 break ; |
114 break ; |
106 |
115 |
107 //------------------------------------------------- standard end section |
116 //------------------------------------------------- standard end section |
108 |
117 |