Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc05x001a.java
41161 views
1
/*
2
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
*
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
7
* published by the Free Software Foundation.
8
*
9
* This code is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
* version 2 for more details (a copy is included in the LICENSE file that
13
* accompanied this code).
14
*
15
* You should have received a copy of the GNU General Public License version
16
* 2 along with this work; if not, write to the Free Software Foundation,
17
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18
*
19
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20
* or visit www.oracle.com if you need additional information or have any
21
* questions.
22
*/
23
24
package nsk.jdi.BScenarios.hotswap;
25
26
import nsk.share.*;
27
import nsk.share.jpda.*;
28
import nsk.share.jdi.*;
29
30
31
// THIS TEST IS LINE NUMBER SENSITIVE
32
33
/**
34
* <code>tc05x001a</code> is deugee's part of the tc05x001.
35
*/
36
public class tc05x001a {
37
38
public final static String brkpMethodName = "method_A";
39
public final static int brkpLineNumber = 71;
40
private static Log log;
41
42
public static void main (String argv[]) {
43
ArgumentHandler argHandler = new ArgumentHandler(argv);
44
log = new Log(System.err, argHandler);
45
IOPipe pipe = argHandler.createDebugeeIOPipe(log);
46
pipe.println("ready");
47
48
String instr;
49
do {
50
instr = pipe.readln();
51
if (instr.equals("perform")) {
52
runIt();
53
} else if (instr.equals("quit")) {
54
log.display(instr);
55
break;
56
} else {
57
log.complain("DEBUGEE> unexpected signal of debugger.");
58
System.exit(Consts.TEST_FAILED + Consts.JCK_STATUS_BASE);
59
}
60
} while (true);
61
log.display("completed succesfully.");
62
System.exit(Consts.TEST_PASSED + Consts.JCK_STATUS_BASE);
63
}
64
65
private static void runIt() {
66
tc05x001a obj = new tc05x001a();
67
obj.method_A();
68
}
69
70
public void method_A() {
71
method_B(); // brkpLineNumber
72
// log.display("new line");
73
// try inserting code here
74
}
75
76
public void method_B() {
77
method_C();
78
}
79
80
public void method_C() {
81
log.display("method_C:: line 1");
82
log.display("method_C:: line 2");
83
log.display("method_C:: line 3");
84
log.display("method_C:: line 4");
85
}
86
}
87
88