public class X86CurrentFrameGuess
extends java.lang.Object
Should be able to be used on all x86 platforms we support (Win32, Solaris/x86, and soon Linux) to implement JavaThread's "currentFrameGuess()" functionality. Input is an X86ThreadContext; output is SP, FP, and PC for an X86Frame. Instantiation of the X86Frame is left to the caller, since we may need to subclass X86Frame to support signal handler frames on Unix platforms.
Algorithm is to walk up the stack within a given range (say, 512K at most) looking for a plausible PC and SP for a Java frame, also considering those coming in from the context. If we find a PC that belongs to the VM (i.e., in generated code like the interpreter or CodeCache) then we try to find an associated EBP. We repeat this until we either find a complete frame or run out of stack to look at.
Constructor and Description |
---|
X86CurrentFrameGuess(X86ThreadContext context,
JavaThread thread) |
Modifier and Type | Method and Description |
---|---|
Address |
getFP() |
Address |
getPC()
May be null if getting values from thread-local storage; take
care to call the correct X86Frame constructor to recover this if
necessary
|
Address |
getSP() |
boolean |
run(long regionInBytesToSearch)
Returns false if not able to find a frame within a reasonable range.
|
public X86CurrentFrameGuess(X86ThreadContext context, JavaThread thread)
public boolean run(long regionInBytesToSearch)
public Address getSP()
public Address getFP()
public Address getPC()
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.