Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc04x001a.java
41160 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.singlethrd;
25
26
import nsk.share.*;
27
import nsk.share.jpda.*;
28
import nsk.share.jdi.*;
29
30
// THIS TEST IS LINE NUMBER SENSITIVE
31
32
/**
33
* <code>tc04x001a</code> is deugee's part of the tc02x001.
34
*/
35
public class tc04x001a {
36
37
public final static int checkExBrkpLine = 69;
38
static Log log;
39
40
public static void main (String argv[]) {
41
ArgumentHandler argHandler = new ArgumentHandler(argv);
42
log = new Log(System.err, argHandler);
43
IOPipe pipe = argHandler.createDebugeeIOPipe(log);
44
pipe.println(tc04x001.SGL_READY);
45
46
tc04x001a obj = null;
47
String instr;
48
do {
49
instr = pipe.readln();
50
log.display("instruction \"" + instr +"\"");
51
if (instr.equals(tc04x001.SGL_LOAD)) {
52
tc04x001aException.loadThis = true;
53
performTest();
54
} else if (instr.equals(tc04x001.SGL_QUIT)) {
55
log.display(instr);
56
break;
57
} else {
58
log.complain("DEBUGEE> unexpected signal of debugger.");
59
System.exit(Consts.TEST_FAILED + Consts.JCK_STATUS_BASE);
60
}
61
} while (true);
62
log.display("completed succesfully.");
63
System.exit(Consts.TEST_PASSED + Consts.JCK_STATUS_BASE);
64
}
65
66
public static void performTest() {
67
log.display("performTest:: throwing tc04x001aException");
68
try {
69
throw new tc04x001aException(); // checkExBrkpLine
70
} catch (tc04x001aException e) {
71
}
72
}
73
}
74
75
class tc04x001aException extends RuntimeException {
76
static boolean loadThis = false;
77
}
78
79