Mercurial > hg > truffle
annotate agent/src/share/classes/sun/jvm/hotspot/debugger/sparc/SPARCThreadContext.java @ 17736:58fc1b1523dc
8034079: G1: Refactor the HeapRegionSet hierarchy
Reviewed-by: tschatzl, pliden
author | brutisso |
---|---|
date | Fri, 14 Mar 2014 10:15:46 +0100 |
parents | fac3dd92ebaf |
children |
rev | line source |
---|---|
0 | 1 /* |
6763 | 2 * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. |
0 | 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 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
25 package sun.jvm.hotspot.debugger.sparc; | |
26 | |
27 import sun.jvm.hotspot.debugger.*; | |
6641
a9fed06c01d2
7154641: Servicability agent should work on platforms other than x86, sparc
bpittore
parents:
1552
diff
changeset
|
28 import sun.jvm.hotspot.debugger.cdbg.*; |
0 | 29 |
30 /** Currently provides just the minimal information necessary to get | |
31 stack traces working. FIXME: currently hardwired for v9 -- will | |
32 have to factor out v8/v9 specific code. FIXME: may want to try to | |
33 share code between this class and asm/sparc. */ | |
34 | |
35 public abstract class SPARCThreadContext implements ThreadContext { | |
36 // Taken from /usr/include/sys/procfs_isa.h | |
37 public static final int R_G0 = 0; | |
38 public static final int R_G1 = 1; | |
39 public static final int R_G2 = 2; | |
40 public static final int R_G3 = 3; | |
41 public static final int R_G4 = 4; | |
42 public static final int R_G5 = 5; | |
43 public static final int R_G6 = 6; | |
44 public static final int R_G7 = 7; | |
45 public static final int R_O0 = 8; | |
46 public static final int R_O1 = 9; | |
47 public static final int R_O2 = 10; | |
48 public static final int R_O3 = 11; | |
49 public static final int R_O4 = 12; | |
50 public static final int R_O5 = 13; | |
51 public static final int R_O6 = 14; | |
52 public static final int R_O7 = 15; | |
53 public static final int R_L0 = 16; | |
54 public static final int R_L1 = 17; | |
55 public static final int R_L2 = 18; | |
56 public static final int R_L3 = 19; | |
57 public static final int R_L4 = 20; | |
58 public static final int R_L5 = 21; | |
59 public static final int R_L6 = 22; | |
60 public static final int R_L7 = 23; | |
61 public static final int R_I0 = 24; | |
62 public static final int R_I1 = 25; | |
63 public static final int R_I2 = 26; | |
64 public static final int R_I3 = 27; | |
65 public static final int R_I4 = 28; | |
66 public static final int R_I5 = 29; | |
67 public static final int R_I6 = 30; | |
68 public static final int R_I7 = 31; | |
69 | |
70 // sparc-v9 | |
71 public static final int R_CCR = 32; | |
72 // sparc-v8 | |
73 public static final int R_PSR = 32; | |
74 | |
75 public static final int R_PC = 33; | |
76 public static final int R_nPC = 34; | |
77 | |
78 public static final int R_SP = R_O6; | |
79 public static final int R_FP = R_I6; | |
80 | |
81 public static final int R_Y = 35; | |
82 | |
83 // sparc-v9 | |
84 public static final int R_ASI = 36; | |
85 public static final int R_FPRS = 37; | |
86 | |
87 // sparc-v8 | |
88 public static final int R_WIM = 36; | |
89 public static final int R_TBR = 37; | |
90 | |
91 public static final int NPRGREG = 38; | |
92 | |
93 private static final String[] regNames = { | |
94 "G0", "G1", "G2", "G3", | |
95 "G4", "G5", "G6", "G7", | |
96 "O0", "O1", "O2", "O3", | |
97 "O4", "O5", "O6/SP", "O7", | |
98 "L0", "L1", "L2", "L3", | |
99 "L4", "L5", "L6", "L7", | |
100 "I0", "I1", "I2", "I3", | |
101 "I4", "I5", "I6/FP", "I7", | |
102 "CCR/PSR", "PC", "nPC", "Y", | |
103 "ASI/WIM", "FPRS/TBR" | |
104 }; | |
105 | |
106 private long[] data; | |
107 | |
108 public SPARCThreadContext() { | |
109 data = new long[NPRGREG]; | |
110 } | |
111 | |
112 public int getNumRegisters() { | |
113 return NPRGREG; | |
114 } | |
115 | |
116 public String getRegisterName(int index) { | |
117 return regNames[index]; | |
118 } | |
119 | |
120 public void setRegister(int index, long value) { | |
121 data[index] = value; | |
122 } | |
123 | |
124 public long getRegister(int index) { | |
125 return data[index]; | |
126 } | |
127 | |
6641
a9fed06c01d2
7154641: Servicability agent should work on platforms other than x86, sparc
bpittore
parents:
1552
diff
changeset
|
128 public CFrame getTopFrame(Debugger dbg) { |
a9fed06c01d2
7154641: Servicability agent should work on platforms other than x86, sparc
bpittore
parents:
1552
diff
changeset
|
129 return null; |
a9fed06c01d2
7154641: Servicability agent should work on platforms other than x86, sparc
bpittore
parents:
1552
diff
changeset
|
130 } |
a9fed06c01d2
7154641: Servicability agent should work on platforms other than x86, sparc
bpittore
parents:
1552
diff
changeset
|
131 |
0 | 132 /** This can't be implemented in this class since we would have to |
133 tie the implementation to, for example, the debugging system */ | |
134 public abstract void setRegisterAsAddress(int index, Address value); | |
135 | |
136 /** This can't be implemented in this class since we would have to | |
137 tie the implementation to, for example, the debugging system */ | |
138 public abstract Address getRegisterAsAddress(int index); | |
139 } |