< prev index next >

agent/src/share/classes/sun/jvm/hotspot/debugger/x86/X86ThreadContext.java

Print this page


   1 /*
   2  * Copyright (c) 2000, 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.x86;
  26 


  27 import sun.jvm.hotspot.debugger.*;
  28 import sun.jvm.hotspot.debugger.cdbg.*;
  29 
  30 /** Specifies the thread context on x86 platforms; only a sub-portion
  31     of the context is guaranteed to be present on all operating
  32     systems. */
  33 
  34 public abstract class X86ThreadContext implements ThreadContext {
  35   // Taken from /usr/include/ia32/sys/reg.h on Solaris/x86
  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): EAX, EBX,
  41   // ECX, EDX, ESI, EDI, EBP, ESP, and EIP.
  42 



  43   public static final int GS = 0;
  44   public static final int FS = 1;
  45   public static final int ES = 2;
  46   public static final int DS = 3;
  47   public static final int EDI = 4;
  48   public static final int ESI = 5;
  49   public static final int EBP = 6;
  50   public static final int ESP = 7;
  51   public static final int EBX = 8;
  52   public static final int EDX = 9;
  53   public static final int ECX = 10;
  54   public static final int EAX = 11;
  55   public static final int TRAPNO = 12;
  56   public static final int ERR = 13;
  57   public static final int EIP = 14;
  58   public static final int CS = 15;
  59   public static final int EFL = 16;
  60   public static final int UESP = 17;
  61   public static final int SS = 18;
  62   // Additional state (not in reg.h) for debug registers


   1 /*
   2  * Copyright (c) 2000, 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.x86;
  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 x86 platforms; only a sub-portion
  33     of the context is guaranteed to be present on all operating
  34     systems. */
  35 
  36 public abstract class X86ThreadContext implements ThreadContext {
  37   // Taken from /usr/include/ia32/sys/reg.h on Solaris/x86
  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): EAX, EBX,
  43   // ECX, EDX, ESI, EDI, EBP, ESP, and EIP.
  44 
  45   // One instance of the Native annotation is enough to trigger header generation
  46   // for this file.
  47   @Native 
  48   public static final int GS = 0;
  49   public static final int FS = 1;
  50   public static final int ES = 2;
  51   public static final int DS = 3;
  52   public static final int EDI = 4;
  53   public static final int ESI = 5;
  54   public static final int EBP = 6;
  55   public static final int ESP = 7;
  56   public static final int EBX = 8;
  57   public static final int EDX = 9;
  58   public static final int ECX = 10;
  59   public static final int EAX = 11;
  60   public static final int TRAPNO = 12;
  61   public static final int ERR = 13;
  62   public static final int EIP = 14;
  63   public static final int CS = 15;
  64   public static final int EFL = 16;
  65   public static final int UESP = 17;
  66   public static final int SS = 18;
  67   // Additional state (not in reg.h) for debug registers


< prev index next >