frysk.dwfl
Class ObjectFile

java.lang.Object
  extended by frysk.dwfl.ObjectFile

public class ObjectFile
extends Object

What ltrace needs to know about each loaded executable or shared library.


Field Summary
private static HashMap cachedFiles
           
private  ElfSection dynamicStrtab
           
private  File filename
           
private static Log fine
           
private static Log finest
           
private  String interp
           
private  File resolvedInterp
           
private  String soname
           
private static Log warning
           
 
Constructor Summary
protected ObjectFile(File file, Elf elfFile, ElfEHeader eh)
           
 
Method Summary
private static void assertFitsToInt(long num, String context)
           
static ObjectFile buildFromFile(String path)
           
private static ElfSection getElfSectionWithAddr(Elf elfFile, long addr)
           
 File getFilename()
          Answer filename.
 String getInterp()
          Answer INTERP or null if none was in file.
 String getSoname()
          Either answer primed soname, or construct soname from filename.
 File resolveInterp()
          Find a canonical path to interpreter and answer that.
protected  void setInterp(String interp)
           
protected  void setSoname(String soname)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

warning

private static final Log warning

fine

private static final Log fine

finest

private static final Log finest

filename

private File filename

soname

private String soname

interp

private String interp

resolvedInterp

private File resolvedInterp

dynamicStrtab

private ElfSection dynamicStrtab

cachedFiles

private static HashMap cachedFiles
Constructor Detail

ObjectFile

protected ObjectFile(File file,
                     Elf elfFile,
                     ElfEHeader eh)
Method Detail

assertFitsToInt

private static void assertFitsToInt(long num,
                                    String context)

setSoname

protected void setSoname(String soname)

getSoname

public String getSoname()
Either answer primed soname, or construct soname from filename.


setInterp

protected void setInterp(String interp)

getInterp

public String getInterp()
Answer INTERP or null if none was in file.


resolveInterp

public File resolveInterp()
Find a canonical path to interpreter and answer that.


getFilename

public File getFilename()
Answer filename.


getElfSectionWithAddr

private static ElfSection getElfSectionWithAddr(Elf elfFile,
                                                long addr)

buildFromFile

public static ObjectFile buildFromFile(String path)