public class SPARCFrame extends Frame
Modifier and Type | Field and Description |
---|---|
static int |
CALLEE_AGGREGATE_RETURN_POINTER_SP_OFFSET |
static int |
CALLEE_AGGREGATE_RETURN_POINTER_WORDS |
static int |
CALLEE_REGISTER_ARGUMENT_SAVE_AREA_SP_OFFSET |
static int |
CALLEE_REGISTER_ARGUMENT_SAVE_AREA_WORDS |
static int |
INTERPRETER_FRAME_D_SCRATCH_FP_OFFSET
2 words, also used to save float regs across calls to C
|
static int |
INTERPRETER_FRAME_EXTRA_OUTGOING_ARGUMENT_WORDS
Interpreter frame set-up needs to save 2 extra words in outgoing
param area for class and jnienv arguments for native stubs (see
nativeStubGen_sparc.cpp)
|
static int |
INTERPRETER_FRAME_L_SCRATCH_FP_OFFSET |
static int |
INTERPRETER_FRAME_MIRROR_OFFSET
For native calls only
|
static int |
INTERPRETER_FRAME_PADDING_OFFSET
For native calls only
|
static int |
INTERPRETER_FRAME_VM_LOCAL_WORDS |
static int |
INTERPRETER_FRAME_VM_LOCALS_FP_OFFSET
Should be same as above, and should be zero mod 8
|
static int |
MEMORY_PARAMETER_WORD_SP_OFFSET |
static int |
PC_RETURN_OFFSET
Normal SPARC return is 2 words past PC
|
static int |
REGISTER_SAVE_WORDS
Size of each block, in order of increasing address
|
static int |
REGISTER_SAVE_WORDS_SP_OFFSET |
static int |
VARARGS_OFFSET |
deoptimized, pc, raw_sp
Constructor and Description |
---|
SPARCFrame(Address raw_sp,
Address pc)
Make a deficient frame which doesn't know where its PC is (note
no youngerSP argument)
|
SPARCFrame(Address raw_sp,
Address raw_youngerSP,
boolean youngerFrameIsInterpreted)
This constructor relies on the fact that the creator of a frame
has flushed register windows which the frame will refer to, and
that those register windows will not be reloaded until the frame
is done reading and writing the stack.
|
Modifier and Type | Method and Description |
---|---|
Address |
addressOfInterpreterFrameCPCache()
Constant pool cache
|
Address |
addressOfInterpreterFrameExpressionStack()
Find receiver for an invoke when arguments are just pushed on
stack (i.e., callee stack-frame is not setup)
|
Address |
addressOfInterpreterFrameLocals() |
Address |
addressOfInterpreterFrameMethod()
Current method
|
Address |
addressOfInterpreterFrameTOS()
Top of expression stack
|
Address |
addressOfInterpreterFrameTOSAt(int slot)
Expression stack from top down
|
protected Address |
addressOfSavedOopResult() |
protected Address |
addressOfSavedReceiver() |
SPARCFrame |
afterSave()
Given the next-younger sp for a given frame's sp, compute the
frame.
|
static Address |
biasSP(Address real_sp) |
java.lang.Object |
clone() |
boolean |
equals(java.lang.Object arg)
testers -- platform dependent
|
static Address |
findYoungerSP(Address top,
Address find) |
long |
frameSize()
Accessors
|
JavaCallWrapper |
getEntryFrameCallWrapper() |
Address |
getFP()
Accessors for the instance variables
|
Address |
getID() |
int |
getInterpreterFrameBCI()
Byte code index.
|
int |
getInterpreterFrameExpressionStackDirection() |
Address |
getInterpreterFrameSenderSP() |
Address |
getLink()
Link (i.e., the pointer to the previous frame)
|
long |
getMContextAreaOffsetInUContext() |
Address |
getSenderPC()
Return address
|
Address |
getSenderSP()
Returns the stack pointer of the calling frame
|
java.lang.String |
getSignalNameDbg()
If this is a signal handler frame (again, on a platform with a
notion of signals), get the name of the signal.
|
int |
getSignalNumberDbg()
If this is a signal handler frame (again, on a platform with a
notion of signals), get the signal number.
|
Address |
getSP() |
long |
getUContextOffset() |
Address |
getUnextendedSP()
The frame's original SP, before any extension by an interpreted
callee; used for packing debug info into vframeArray objects and
vframeArray lookup.
|
Address |
getYoungerSP() |
int |
hashCode() |
protected boolean |
hasSenderPD()
Platform-dependent query indicating whether this frame has a
sender.
|
BasicObjectLock |
interpreterFrameMonitorBegin() |
BasicObjectLock |
interpreterFrameMonitorEnd() |
int |
interpreterFrameMonitorSize()
NOTE: this returns a size in BYTES in this system!
|
boolean |
isInterpretedFrameValid()
performs sanity checks on interpreted frames.
|
boolean |
isSignalHandlerFrameDbg()
Identifies a signal handler frame on the stack.
|
Frame |
sender(RegisterMap regMap,
CodeBlob cb)
returns the sending frame
|
java.lang.String |
toString() |
static Address |
unBiasSP(Address raw_sp) |
addressOfInterpreterFrameExpressionStackSlot, addressOfInterpreterFrameLocal, addressOfStackSlot, bcpToBci, bcpToBci, canBeDeoptimized, cb, entryFrameIsFirst, getIntAt, getInterpreterFrameCPCache, getInterpreterFrameExpressionStackSize, getInterpreterFrameMethod, getOopHandleAt, getPC, getSavedOopResult, getSavedReceiver, interpreterFramePrintOn, isCompiledFrame, isDeoptimized, isEntryFrame, isFirstFrame, isFirstJavaFrame, isInterpretedFrame, isJavaFrame, isNativeFrame, isRuntimeFrame, nextMonitorInInterpreterFrame, oopMapRegToLocation, oopsDo, oopsInterpretedArgumentsDo, pcReturnOffset, previousMonitorInInterpreterFrame, print, printOn, printValue, printValueOn, realSender, sender, setPC, shouldBeDeoptimized
public static final int PC_RETURN_OFFSET
public static final int REGISTER_SAVE_WORDS
public static final int CALLEE_AGGREGATE_RETURN_POINTER_WORDS
public static final int CALLEE_REGISTER_ARGUMENT_SAVE_AREA_WORDS
public static final int REGISTER_SAVE_WORDS_SP_OFFSET
public static final int CALLEE_AGGREGATE_RETURN_POINTER_SP_OFFSET
public static final int CALLEE_REGISTER_ARGUMENT_SAVE_AREA_SP_OFFSET
public static final int MEMORY_PARAMETER_WORD_SP_OFFSET
public static final int VARARGS_OFFSET
public static final int INTERPRETER_FRAME_D_SCRATCH_FP_OFFSET
public static final int INTERPRETER_FRAME_L_SCRATCH_FP_OFFSET
public static final int INTERPRETER_FRAME_PADDING_OFFSET
public static final int INTERPRETER_FRAME_MIRROR_OFFSET
public static final int INTERPRETER_FRAME_VM_LOCALS_FP_OFFSET
public static final int INTERPRETER_FRAME_VM_LOCAL_WORDS
public static final int INTERPRETER_FRAME_EXTRA_OUTGOING_ARGUMENT_WORDS
public SPARCFrame(Address raw_sp, Address raw_youngerSP, boolean youngerFrameIsInterpreted)
public Address getYoungerSP()
public boolean equals(java.lang.Object arg)
Frame
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isSignalHandlerFrameDbg()
Identifies a signal handler frame on the stack.
There are a few different algorithms for doing this, and they vary from platform to platform. For example, based on a conversation with Dave Dice, Solaris/x86 will be substantially simpler to handle than Solaris/SPARC because the signal handler frame can be identified because of a program counter == -1.
The dbx group provided code and advice on these topics; the code below evolved from theirs, but is not correct/robust. Without going into too many details, it seems that looking for the incoming argument to the sigacthandler frame (which is what this code identifies) is not guaranteed to be stable across versions of Solaris, since that function is supplied by libthread and is not guaranteed not to clobber I2 before it calls __sighndlr later. From discussions, it sounds like a robust algorithm which wouldn't require traversal of the ucontext chain (used by dbx, but which Dave Dice thinks isn't robust in the face of libthread -- need to follow up) would be to be able to properly identify the __sighndlr frame, then get I2 and treat that as a ucontext. To identify __sighndlr we would need to look up that symbol in the remote process and look for a program counter within a certain (small) distance.
If the underlying Debugger supports CDebugger interface, we take the approach of __sighnldr symbol. This approach is more robust compared to the original hueristic approach. Of course, if there is no CDebugger support, we fallback to the hueristic approach.
The current implementation seems to work with Solaris 2.8. A nice property of this system is that if we find a core file this algorithm doesn't work on, we can change the code and try again, so I'm putting this in as the current mechanism for finding signal handler frames on Solaris/SPARC.
isSignalHandlerFrameDbg
in class Frame
public int getSignalNumberDbg()
Frame
getSignalNumberDbg
in class Frame
public java.lang.String getSignalNameDbg()
Frame
getSignalNameDbg
in class Frame
public boolean isInterpretedFrameValid()
Frame
isInterpretedFrameValid
in class Frame
public Address getLink()
Frame
public Frame sender(RegisterMap regMap, CodeBlob cb)
Frame
protected boolean hasSenderPD()
Frame
hasSenderPD
in class Frame
public Address getSenderPC()
Frame
getSenderPC
in class Frame
public Address getUnextendedSP()
Frame
getUnextendedSP
in class Frame
public Address getSenderSP()
Frame
getSenderSP
in class Frame
public SPARCFrame afterSave()
public Address getFP()
public Address addressOfInterpreterFrameLocals()
addressOfInterpreterFrameLocals
in class Frame
public int getInterpreterFrameBCI()
Frame
getInterpreterFrameBCI
in class Frame
public Address addressOfInterpreterFrameExpressionStack()
Frame
addressOfInterpreterFrameExpressionStack
in class Frame
public int getInterpreterFrameExpressionStackDirection()
getInterpreterFrameExpressionStackDirection
in class Frame
public Address addressOfInterpreterFrameTOS()
addressOfInterpreterFrameTOS
in class Frame
public Address addressOfInterpreterFrameTOSAt(int slot)
addressOfInterpreterFrameTOSAt
in class Frame
public Address getInterpreterFrameSenderSP()
getInterpreterFrameSenderSP
in class Frame
public BasicObjectLock interpreterFrameMonitorBegin()
interpreterFrameMonitorBegin
in class Frame
public BasicObjectLock interpreterFrameMonitorEnd()
interpreterFrameMonitorEnd
in class Frame
public int interpreterFrameMonitorSize()
Frame
interpreterFrameMonitorSize
in class Frame
public Address addressOfInterpreterFrameMethod()
Frame
addressOfInterpreterFrameMethod
in class Frame
public Address addressOfInterpreterFrameCPCache()
Frame
addressOfInterpreterFrameCPCache
in class Frame
public JavaCallWrapper getEntryFrameCallWrapper()
getEntryFrameCallWrapper
in class Frame
protected Address addressOfSavedOopResult()
addressOfSavedOopResult
in class Frame
protected Address addressOfSavedReceiver()
addressOfSavedReceiver
in class Frame
public long getUContextOffset()
public long getMContextAreaOffsetInUContext()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.