Top Fields Constructors Methods
sun.jvm.hotspot.debugger.cdbg.basic

public Class BasicCDebugInfoDataBase

extends Object
implements CDebugInfoDataBase
Class Inheritance
All Implemented Interfaces
sun.jvm.hotspot.debugger.cdbg.CDebugInfoDataBase
Imports
java.util.*, sun.jvm.hotspot.debugger.*, sun.jvm.hotspot.debugger.cdbg.*, sun.jvm.hotspot.utilities.AddressOps, .Assert

Field Summary

Modifier and TypeField and Description
private List<BlockSym>
private static final int
private static final int
private static final int
private Map<Object, BlockSym>
private Map<Object, Type>
private BasicLineNumberMapping
private Map<String, GlobalSym>
private Map<String, Type>
private static final int
private int
private List<Type>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addBlock(Object key, BlockSym block)

Add a BlockSym to the debug information database.

public void
public void
public void
addType(Object lazyKey, Type type)

Add a type which may later in construction be referred to via a LazyType with this key.

public void
beginConstruction()

Supports lazy instantiation and references between types and symbols via insertion using arbitrary Object keys that are wrapped by LazyTypes.

public BlockSym
debugInfoForPC(Address pc)

Implements sun.jvm.hotspot.debugger.cdbg.CDebugInfoDataBase.debugInfoForPC.

Return debug info (closest lexically-enclosing block) for current program counter.

public void
public void
public void
iterate(LineNumberVisitor v)

Implements sun.jvm.hotspot.debugger.cdbg.CDebugInfoDataBase.iterate.

Iteration through all line number information in this database.

public LineNumberInfo
lineNumberForPC(Address pc)

Implements sun.jvm.hotspot.debugger.cdbg.CDebugInfoDataBase.lineNumberForPC.

Returns line number information for the given PC, including source file name (not specified whether this is an absolute or relative path) and start and end PCs for this line.

public GlobalSym
lookupSym(String name)

Implements sun.jvm.hotspot.debugger.cdbg.CDebugInfoDataBase.lookupSym.

Look up global or module-local symbol by name.

public Type
public Type
lookupType(String name, int cvAttributes)

Implements sun.jvm.hotspot.debugger.cdbg.CDebugInfoDataBase.lookupType.

Name-to-type mapping with const/volatile qualifications

public void
private void
public Sym
resolveSym(Sym containingSymbol, Sym targetSym, ResolveListener listener, String detail)

Intended only to be usd by the BasicSym implementation.

public Type
resolveType(Type containingType, Type targetType, ResolveListener listener, String detail)

Intended only to be used by the BasicType implementation.

public Type
resolveType(Sym containingSymbol, Type targetType, ResolveListener listener, String detail)

Intended only to be usd by the BasicSym implementation.

private BlockSym
searchBlocks(Address addr, int lowIdx, int highIdx)

Find the block whose starting address is closest to but less than the given address.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

blocksback to summary
private List<BlockSym> blocks
COMPLETE_STATEback to summary
private static final int COMPLETE_STATE
CONSTRUCTION_STATEback to summary
private static final int CONSTRUCTION_STATE
INITIALIZED_STATEback to summary
private static final int INITIALIZED_STATE
lazySymMapback to summary
private Map<Object, BlockSym> lazySymMap
lazyTypeMapback to summary
private Map<Object, Type> lazyTypeMap
lineNumbersback to summary
private BasicLineNumberMapping lineNumbers
nameToSymMapback to summary
private Map<String, GlobalSym> nameToSymMap
nameToTypeMapback to summary
private Map<String, Type> nameToTypeMap
RESOLVED_STATEback to summary
private static final int RESOLVED_STATE
stateback to summary
private int state
typesback to summary
private List<Type> types

Constructor Detail

BasicCDebugInfoDataBaseback to summary
public BasicCDebugInfoDataBase()

Method Detail

addBlockback to summary
public void addBlock(Object key, BlockSym block)

Add a BlockSym to the debug information database. The given BlockSym may be referred to by a LazyBlockSym wrapping the given Object key, which must be non-null. Any references to other blocks (for example, the parent scope) should be made with LazyBlockSyms. These references will be resolved after the database is built.

addGlobalSymback to summary
public void addGlobalSym(GlobalSym sym)
addLineNumberInfoback to summary
public void addLineNumberInfo(BasicLineNumberInfo info)
addTypeback to summary
public void addType(Object lazyKey, Type type)

Add a type which may later in construction be referred to via a LazyType with this key. lazyKey may be null.

beginConstructionback to summary
public void beginConstruction()

Supports lazy instantiation and references between types and symbols via insertion using arbitrary Object keys that are wrapped by LazyTypes. Once the database has been fully constructed and all types are present, one should call resolveTypes(), which will resolve all LazyTypes down to concrete types (and signal an error if some lazy types were unresolved).

debugInfoForPCback to summary
public BlockSym debugInfoForPC(Address pc)

Implements sun.jvm.hotspot.debugger.cdbg.CDebugInfoDataBase.debugInfoForPC.

Doc from sun.jvm.hotspot.debugger.cdbg.CDebugInfoDataBase.debugInfoForPC.

Return debug info (closest lexically-enclosing block) for current program counter. Returns null if no debug information found or available.

endConstructionback to summary
public void endConstruction()
iterateback to summary
public void iterate(TypeVisitor v)

Implements sun.jvm.hotspot.debugger.cdbg.CDebugInfoDataBase.iterate.

Doc from sun.jvm.hotspot.debugger.cdbg.CDebugInfoDataBase.iterate.

Iteration through all types

iterateback to summary
public void iterate(LineNumberVisitor v)

Implements sun.jvm.hotspot.debugger.cdbg.CDebugInfoDataBase.iterate.

Doc from sun.jvm.hotspot.debugger.cdbg.CDebugInfoDataBase.iterate.

Iteration through all line number information in this database.

lineNumberForPCback to summary
public LineNumberInfo lineNumberForPC(Address pc) throws DebuggerException

Implements sun.jvm.hotspot.debugger.cdbg.CDebugInfoDataBase.lineNumberForPC.

Doc from sun.jvm.hotspot.debugger.cdbg.CDebugInfoDataBase.lineNumberForPC.

Returns line number information for the given PC, including source file name (not specified whether this is an absolute or relative path) and start and end PCs for this line. Returns null if no line number information is available.

lookupSymback to summary
public GlobalSym lookupSym(String name)

Implements sun.jvm.hotspot.debugger.cdbg.CDebugInfoDataBase.lookupSym.

Doc from sun.jvm.hotspot.debugger.cdbg.CDebugInfoDataBase.lookupSym.

Look up global or module-local symbol by name. FIXME: need some way to identify modules -- has not been thought through yet because it isn't clear exactly how these are represented in the Visual C++ debug info.

lookupTypeback to summary
public Type lookupType(String name)

Implements sun.jvm.hotspot.debugger.cdbg.CDebugInfoDataBase.lookupType.

Doc from sun.jvm.hotspot.debugger.cdbg.CDebugInfoDataBase.lookupType.

Name-to-type mapping

lookupTypeback to summary
public Type lookupType(String name, int cvAttributes)

Implements sun.jvm.hotspot.debugger.cdbg.CDebugInfoDataBase.lookupType.

Doc from sun.jvm.hotspot.debugger.cdbg.CDebugInfoDataBase.lookupType.

Name-to-type mapping with const/volatile qualifications

resolveback to summary
public void resolve(ResolveListener listener)
resolveLazyMapback to summary
private void resolveLazyMap(ResolveListener listener)
resolveSymback to summary
public Sym resolveSym(Sym containingSymbol, Sym targetSym, ResolveListener listener, String detail)

Intended only to be usd by the BasicSym implementation.

resolveTypeback to summary
public Type resolveType(Type containingType, Type targetType, ResolveListener listener, String detail)

Intended only to be used by the BasicType implementation.

resolveTypeback to summary
public Type resolveType(Sym containingSymbol, Type targetType, ResolveListener listener, String detail)

Intended only to be usd by the BasicSym implementation.

searchBlocksback to summary
private BlockSym searchBlocks(Address addr, int lowIdx, int highIdx)

Find the block whose starting address is closest to but less than the given address.