1 /*
2 * Copyright (c) 2003, 2012, 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
25 package sun.jvm.hotspot.debugger.amd64;
26
27 import sun.jvm.hotspot.debugger.*;
28 import sun.jvm.hotspot.debugger.cdbg.*;
29
30 /** Specifies the thread context on amd64 platforms; only a sub-portion
31 * of the context is guaranteed to be present on all operating
32 * systems. */
33
34 public abstract class AMD64ThreadContext implements ThreadContext {
35 // Taken from /usr/include/sys/regset.h on Solaris/AMD64.
36
37 // NOTE: the indices for the various registers must be maintained as
38 // listed across various operating systems. However, only a small
39 // subset of the registers' values are guaranteed to be present (and
40 // must be present for the SA's stack walking to work)
41
42 public static final int R15 = 0;
43 public static final int R14 = 1;
44 public static final int R13 = 2;
45 public static final int R12 = 3;
46 public static final int R11 = 4;
47 public static final int R10 = 5;
48 public static final int R9 = 6;
49 public static final int R8 = 7;
50 public static final int RDI = 8;
51 public static final int RSI = 9;
52 public static final int RBP = 10;
53 public static final int RBX = 11;
54 public static final int RDX = 12;
55 public static final int RCX = 13;
56 public static final int RAX = 14;
57 public static final int TRAPNO = 15;
58 public static final int ERR = 16;
59 public static final int RIP = 17;
60 public static final int CS = 18;
61 public static final int RFL = 19;
|
1 /*
2 * Copyright (c) 2003, 2015, 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
25 package sun.jvm.hotspot.debugger.amd64;
26
27 import java.lang.annotation.Native;
28
29 import sun.jvm.hotspot.debugger.*;
30 import sun.jvm.hotspot.debugger.cdbg.*;
31
32 /** Specifies the thread context on amd64 platforms; only a sub-portion
33 * of the context is guaranteed to be present on all operating
34 * systems. */
35
36 public abstract class AMD64ThreadContext implements ThreadContext {
37 // Taken from /usr/include/sys/regset.h on Solaris/AMD64.
38
39 // NOTE: the indices for the various registers must be maintained as
40 // listed across various operating systems. However, only a small
41 // subset of the registers' values are guaranteed to be present (and
42 // must be present for the SA's stack walking to work)
43
44 // One instance of the Native annotation is enough to trigger header generation
45 // for this file.
46 @Native
47 public static final int R15 = 0;
48 public static final int R14 = 1;
49 public static final int R13 = 2;
50 public static final int R12 = 3;
51 public static final int R11 = 4;
52 public static final int R10 = 5;
53 public static final int R9 = 6;
54 public static final int R8 = 7;
55 public static final int RDI = 8;
56 public static final int RSI = 9;
57 public static final int RBP = 10;
58 public static final int RBX = 11;
59 public static final int RDX = 12;
60 public static final int RCX = 13;
61 public static final int RAX = 14;
62 public static final int TRAPNO = 15;
63 public static final int ERR = 16;
64 public static final int RIP = 17;
65 public static final int CS = 18;
66 public static final int RFL = 19;
|