lib.dwfl
Class Dwfl

java.lang.Object
  extended by lib.dwfl.Dwfl

public class Dwfl
extends Object


Field Summary
private  long callbacks
           
private  int devMajor
           
private  int devMinor
           
protected  DwarfDieFactory factory
           
private static Log fine
           
private static Log finest
           
private  long high
           
private  int inode
           
private  long low
           
private  LinkedHashMap modules
          Maintain a set of known modules, it is rebuilt each time there's a report begin/end.
private  DwflModule[] modulesArray
           
private  String name
           
private  long pointer
           
private  long vdso
           
 
Constructor Summary
Dwfl(String debugInfoPath)
          Create a dwfl with the specified debug-info search path.
 
Method Summary
private static long callbacksBegin(String debugInfoSearchPath)
           
private static void callbacksEnd(long callbacks)
           
 void close()
           
private static long dwflBegin(long callbacks)
           
private static void dwflEnd(long pointer)
           
protected  void finalize()
           
 DwflDie getCompilationUnit(long addr)
           
 DwarfDieFactory getFactory()
           
 LinkedList getLineAddresses(String fileName, int lineNo, int column)
          Get all the DwflLine objects associated with a line in a source file.
 DwflModule getModule(long addr)
          Get the DwflModule associated with an address.
 DwflModule[] getModules()
          Return all the DwflModule objects associated with this Dwfl.
(package private)  long getPointer()
           
 DwflLine getSourceLine(long addr)
           
 boolean isLineExecutable(String fileName, int lineNo, int column)
          Test to see if the requested line number is executable.
 void mapBegin(long vdso)
          Start refreshing the address map using raw information extracted from /proc/pid/maps.
 void mapEnd()
          Finish reporting a raw address map.
 void mapModule(String name, long low, long high, int devMajor, int devMinor, int inode)
          Report a single raw line from /proc/pid/maps.
 void reportBegin()
          Start a refresh of the address map.
private static void reportBegin(long pointer)
           
 void reportEnd()
          Finish a refresh of the address map.
private static void reportEnd(long pointer)
           
private static long reportModule(long pointer, String moduleName, long low, long high)
           
 void reportModule(String moduleName, long low, long high)
          Report a mapped component.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fine

private static final Log fine

finest

private static final Log finest

pointer

private long pointer

callbacks

private long callbacks

factory

protected final DwarfDieFactory factory

modules

private final LinkedHashMap modules
Maintain a set of known modules, it is rebuilt each time there's a report begin/end.


modulesArray

private DwflModule[] modulesArray

name

private String name

low

private long low

high

private long high

devMajor

private int devMajor

devMinor

private int devMinor

inode

private int inode

vdso

private long vdso
Constructor Detail

Dwfl

public Dwfl(String debugInfoPath)
Create a dwfl with the specified debug-info search path.

Method Detail

callbacksBegin

private static long callbacksBegin(String debugInfoSearchPath)

dwflBegin

private static long dwflBegin(long callbacks)

finalize

protected void finalize()
Overrides:
finalize in class Object

close

public void close()

dwflEnd

private static void dwflEnd(long pointer)

callbacksEnd

private static void callbacksEnd(long callbacks)

getSourceLine

public DwflLine getSourceLine(long addr)

getCompilationUnit

public DwflDie getCompilationUnit(long addr)

getPointer

long getPointer()

getLineAddresses

public LinkedList getLineAddresses(String fileName,
                                   int lineNo,
                                   int column)
Get all the DwflLine objects associated with a line in a source file.


isLineExecutable

public boolean isLineExecutable(String fileName,
                                int lineNo,
                                int column)
Test to see if the requested line number is executable.


getFactory

public DwarfDieFactory getFactory()

reportBegin

public void reportBegin()
Start a refresh of the address map.


reportBegin

private static void reportBegin(long pointer)

reportEnd

public void reportEnd()
Finish a refresh of the address map.


reportEnd

private static void reportEnd(long pointer)

reportModule

public void reportModule(String moduleName,
                         long low,
                         long high)
Report a mapped component.


reportModule

private static long reportModule(long pointer,
                                 String moduleName,
                                 long low,
                                 long high)

mapBegin

public void mapBegin(long vdso)
Start refreshing the address map using raw information extracted from /proc/pid/maps.


mapModule

public void mapModule(String name,
                      long low,
                      long high,
                      int devMajor,
                      int devMinor,
                      int inode)
Report a single raw line from /proc/pid/maps.


mapEnd

public void mapEnd()
Finish reporting a raw address map.


getModules

public DwflModule[] getModules()
Return all the DwflModule objects associated with this Dwfl. Use a the cached array if possible.

Returns:
an array of DwflModule.

getModule

public DwflModule getModule(long addr)
Get the DwflModule associated with an address.

Returns:
The module