An implementation of the JVMDebugger interface. The basic debug facilities are implemented through ptrace interface in the JNI code (libsaproc.so). Library maps and symbol table management are done in JNI.
Note
that since we have the notion of fetching "Java primitive types" from the remote process (which might have different sizes than we expect) we have a bootstrapping problem. We need to know the sizes of these types before we can fetch them. The current implementation solves this problem by requiring that it be configured with these type sizes before they can be fetched. The readJ(Type) routines here will throw a RuntimeException if they are called before the debugger is configured with the Java primitive type sizes.
Modifier and Type | Class and Description |
---|---|
pack-priv class | |
pack-priv static interface |
Modifier and Type | Field and Description |
---|---|
private boolean | |
private LinuxCDebugger | |
private boolean | |
private List | |
private Map | |
private long | |
private List | |
private boolean | |
private LinuxDebuggerLocal. |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public String | addressValueToString(long address)
Implements sun. From the LinuxDebugger interface |
public synchronized void | attach(int processID)
Implements sun. From the Debugger interface via JVMDebugger |
public synchronized void | attach(String execName, String coreName)
Implements sun. From the Debugger interface via JVMDebugger |
private native void | |
private native void | |
private void | |
public String | consoleExecuteCommand(String cmd)
Implements sun. If the underlying debugger has a console (as dbx does), this provides access to it. |
private ClosestSymbol | |
private LoadObject | |
public native String | |
public synchronized boolean | detach()
Implements sun. From the Debugger interface via JVMDebugger |
private native void | |
private void | |
private void | |
public Address | |
public native long | |
public static native int | |
public long | getAddressValue(Address addr)
Implements sun. From the LinuxDebugger interface |
public CDebugger | getCDebugger()
Implements sun. If this platform supports C/C++ debugging via the CDebugger interface, returns a CDebugger object; otherwise returns null. |
public String | getConsolePrompt()
Implements sun. If the underlying debugger has a console, this returns the debugger-specific prompt which should be displayed. |
public String | getCPU()
Implements sun. From the Debugger interface via JVMDebugger |
public int | |
public List | getLoadObjectList()
Implements sun. From the LinuxCDebugger interface |
public MachineDescription | getMachineDescription()
Implements sun. From the Debugger interface |
private int | |
public String | getOS()
Implements sun. From the Debugger interface via JVMDebugger |
public List | getProcessList()
Implements sun. From the Debugger interface via JVMDebugger |
public ThreadProxy | getThreadForIdentifierAddress(Address addr)
Implements sun. From the ThreadAccess interface via Debugger and JVMDebugger |
public ThreadProxy | getThreadForThreadId(long id)
Implements sun. From the ThreadAccess interface via Debugger and JVMDebugger |
public synchronized long[] | |
private native long[] | |
public List | getThreadList()
Implements sun. From the LinuxCDebugger interface |
private long | |
public boolean | hasConsole()
Implements sun. Find out whether this debugger has a console available on which commands can be executed; see executeCommandOnConsole, below. |
public boolean | hasProcessList()
Implements sun. From the Debugger interface via JVMDebugger |
private static native void | |
public synchronized Address | lookup(String objectName, String symbol)
Implements sun. From the SymbolLookup interface via Debugger and JVMDebugger |
public synchronized ClosestSymbol | lookup(long addr)
Implements sun. From the LinuxCDebugger interface |
private native ClosestSymbol | |
private native long | |
public synchronized OopHandle | lookupOop(String objectName, String symbol)
Implements sun. From the SymbolLookup interface via Debugger and JVMDebugger |
public Address | newAddress(long value)
Implements sun. From the LinuxDebugger interface |
public Address | parseAddress(String addressString)
Implements sun. From the Debugger interface via JVMDebugger |
public LinuxAddress | readAddress(long address)
Implements sun. From the LinuxDebugger interface |
public synchronized ReadResult | readBytesFromProcess(long address, long numBytes)
Implements sun. This reads bytes from the remote process. |
private native byte[] | |
public LinuxAddress | readCompKlassAddress(long address)
Implements sun.
|
public LinuxAddress | readCompOopAddress(long address)
Implements sun.
|
public LinuxOopHandle | readCompOopHandle(long address)
Implements sun.
|
public LinuxOopHandle | readOopHandle(long address)
Implements sun. From the LinuxDebugger interface |
private void | |
private native void |
attached | back to summary |
---|---|
private boolean attached |
cdbg | back to summary |
---|---|
private LinuxCDebugger cdbg |
isCore | back to summary |
---|---|
private boolean isCore |
loadObjectList | back to summary |
---|---|
private List<LoadObject> loadObjectList |
nspidMap | back to summary |
---|---|
private Map<Integer, Integer> nspidMap |
p_ps_prochandle | back to summary |
---|---|
private long p_ps_prochandle |
threadList | back to summary |
---|---|
private List<ThreadProxy> threadList |
useGCC32ABI | back to summary |
---|---|
private boolean useGCC32ABI |
workerThread | back to summary |
---|---|
private LinuxDebuggerLocal. |
LinuxDebuggerLocal | back to summary |
---|---|
public LinuxDebuggerLocal(MachineDescription machDesc, boolean useCache) throws DebuggerException machDesc may not be null. useCache should be set to true if debugging is being done locally, and to false if the debugger is being created for the purpose of supporting remote debugging. |
addressValueToString | back to summary |
---|---|
public String addressValueToString(long address) Implements sun. From the LinuxDebugger interface |
attach | back to summary |
---|---|
public synchronized void attach(int processID) throws DebuggerException Implements sun. From the Debugger interface via JVMDebugger |
attach | back to summary |
---|---|
public synchronized void attach(String execName, String coreName) Implements sun. From the Debugger interface via JVMDebugger |
attach0 | back to summary |
---|---|
private native void attach0(int pid) throws DebuggerException |
attach0 | back to summary |
---|---|
private native void attach0(String execName, String coreName) throws DebuggerException |
checkAttached | back to summary |
---|---|
private void checkAttached() throws DebuggerException |
consoleExecuteCommand | back to summary |
---|---|
public String consoleExecuteCommand(String cmd) throws DebuggerException Implements sun. Doc from sun. If the underlying debugger has a console (as dbx does), this provides access to it. Takes in a platform-dependent String, executes it on the debugger's console, and returns any output as a String. |
createClosestSymbol | back to summary |
---|---|
private ClosestSymbol createClosestSymbol(String name, long offset) |
createLoadObject | back to summary |
---|---|
private LoadObject createLoadObject(String fileName, long size, long base) |
demangle | back to summary |
---|---|
public native String demangle(String sym) Implements sun.
|
detach | back to summary |
---|---|
public synchronized boolean detach() Implements sun. From the Debugger interface via JVMDebugger |
detach0 | back to summary |
---|---|
private native void detach0() throws DebuggerException |
fillNSpidMap | back to summary |
---|---|
private void fillNSpidMap(Path proc) |
findABIVersion | back to summary |
---|---|
private void findABIVersion() throws DebuggerException |
findLibPtrByAddress | back to summary |
---|---|
public Address findLibPtrByAddress(Address pc) Implements sun.
|
findLibPtrByAddress0 | back to summary |
---|---|
public native long findLibPtrByAddress0(long pc) |
getAddressSize | back to summary |
---|---|
public static native int getAddressSize() |
getAddressValue | back to summary |
---|---|
public long getAddressValue(Address addr) Implements sun. From the LinuxDebugger interface |
getCDebugger | back to summary |
---|---|
public CDebugger getCDebugger() Implements sun. Doc from sun. If this platform supports C/C++ debugging via the CDebugger interface, returns a CDebugger object; otherwise returns null. |
getConsolePrompt | back to summary |
---|---|
public String getConsolePrompt() throws DebuggerException Implements sun. Doc from sun. If the underlying debugger has a console, this returns the debugger-specific prompt which should be displayed. |
getCPU | back to summary |
---|---|
public String getCPU() Implements sun. From the Debugger interface via JVMDebugger |
getHostPID | back to summary |
---|---|
public int getHostPID(int id) |
getLoadObjectList | back to summary |
---|---|
public List Implements sun. From the LinuxCDebugger interface |
getMachineDescription | back to summary |
---|---|
public MachineDescription getMachineDescription() Implements sun. From the Debugger interface |
getNamespacePID | back to summary |
---|---|
private int getNamespacePID(Path statusPath) |
getOS | back to summary |
---|---|
public String getOS() Implements sun. From the Debugger interface via JVMDebugger |
getProcessList | back to summary |
---|---|
public List Implements sun. From the Debugger interface via JVMDebugger |
getThreadForIdentifierAddress | back to summary |
---|---|
public ThreadProxy getThreadForIdentifierAddress(Address addr) Implements sun. From the ThreadAccess interface via Debugger and JVMDebugger |
getThreadForThreadId | back to summary |
---|---|
public ThreadProxy getThreadForThreadId(long id) Implements sun. From the ThreadAccess interface via Debugger and JVMDebugger |
getThreadIntegerRegisterSet | back to summary |
---|---|
public synchronized long[] getThreadIntegerRegisterSet(int lwp_id) throws DebuggerException Implements sun. |
getThreadIntegerRegisterSet0 | back to summary |
---|---|
private native long[] getThreadIntegerRegisterSet0(int lwp_id) throws DebuggerException |
getThreadList | back to summary |
---|---|
public List Implements sun. From the LinuxCDebugger interface |
handleGCC32ABI | back to summary |
---|---|
private long handleGCC32ABI(long addr, String symbol) throws DebuggerException |
hasConsole | back to summary |
---|---|
public boolean hasConsole() throws DebuggerException Implements sun. Doc from sun. Find out whether this debugger has a console available on which commands can be executed; see executeCommandOnConsole, below. This is an interim routine designed to allow access to the underlying dbx process on Solaris until we have disassembly, etc. in the SA. |
hasProcessList | back to summary |
---|---|
public boolean hasProcessList() throws DebuggerException Implements sun. From the Debugger interface via JVMDebugger |
init0 | back to summary |
---|---|
private static native void init0() throws DebuggerException |
lookup | back to summary |
---|---|
public synchronized Address lookup(String objectName, String symbol) Implements sun. From the SymbolLookup interface via Debugger and JVMDebugger |
lookup | back to summary |
---|---|
public synchronized ClosestSymbol lookup(long addr) Implements sun. From the LinuxCDebugger interface |
lookupByAddress0 | back to summary |
---|---|
private native ClosestSymbol lookupByAddress0(long address) throws DebuggerException |
lookupByName0 | back to summary |
---|---|
private native long lookupByName0(String objectName, String symbol) throws DebuggerException |
lookupOop | back to summary |
---|---|
public synchronized OopHandle lookupOop(String objectName, String symbol) Implements sun. From the SymbolLookup interface via Debugger and JVMDebugger |
newAddress | back to summary |
---|---|
public Address newAddress(long value) Implements sun. From the LinuxDebugger interface |
parseAddress | back to summary |
---|---|
public Address parseAddress(String addressString) throws NumberFormatException Implements sun. From the Debugger interface via JVMDebugger |
readAddress | back to summary |
---|---|
public LinuxAddress readAddress(long address) throws UnmappedAddressException, UnalignedAddressException Implements sun. From the LinuxDebugger interface |
readBytesFromProcess | back to summary |
---|---|
public synchronized ReadResult readBytesFromProcess(long address, long numBytes) throws UnmappedAddressException, DebuggerException Implements sun. This reads bytes from the remote process. |
readBytesFromProcess0 | back to summary |
---|---|
private native byte[] readBytesFromProcess0(long address, long numBytes) throws DebuggerException |
readCompKlassAddress | back to summary |
---|---|
public LinuxAddress readCompKlassAddress(long address) throws UnmappedAddressException, UnalignedAddressException Implements sun. |
readCompOopAddress | back to summary |
---|---|
public LinuxAddress readCompOopAddress(long address) throws UnmappedAddressException, UnalignedAddressException Implements sun. |
readCompOopHandle | back to summary |
---|---|
public LinuxOopHandle readCompOopHandle(long address) throws UnmappedAddressException, UnalignedAddressException, NotInHeapException Implements sun. |
readOopHandle | back to summary |
---|---|
public LinuxOopHandle readOopHandle(long address) throws UnmappedAddressException, UnalignedAddressException, NotInHeapException Implements sun. From the LinuxDebugger interface |
requireAttach | back to summary |
---|---|
private void requireAttach() |
setSAAltRoot0 | back to summary |
---|---|
private native void setSAAltRoot0(String altroot) |
Modifier and Type | Field and Description |
---|---|
pack-priv LinuxDebuggerLocal | |
pack-priv DebuggerException | |
pack-priv LinuxDebuggerLocal. |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public LinuxDebuggerLocal. | |
public void | run()
Overrides java. Implements java. This method is run by the thread when it executes. |
debugger | back to summary |
---|---|
pack-priv LinuxDebuggerLocal debugger |
lastException | back to summary |
---|---|
pack-priv DebuggerException lastException |
task | back to summary |
---|---|
pack-priv LinuxDebuggerLocal. |
LinuxDebuggerLocalWorkerThread | back to summary |
---|---|
public LinuxDebuggerLocalWorkerThread(LinuxDebuggerLocal debugger) |
execute | back to summary |
---|---|
public LinuxDebuggerLocal. |
run | back to summary |
---|---|
public void run() Overrides java. Implements java. Doc from java. This method is run by the thread when it executes. Subclasses of This method is not intended to be invoked directly. If this thread is a
platform thread created with a |
Modifier and Type | Method and Description |
---|---|
public void |
doit | back to summary |
---|---|
public void doit(LinuxDebuggerLocal debugger) throws DebuggerException |