frysk.dwfl
Class ElfSectionCache

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

public class ElfSectionCache
extends Object

Class to provide and cache requested ElfSectionHeaders based on name.


Field Summary
private  WeakHashMap sectionMap
           
private  Task task
           
 
Constructor Summary
ElfSectionCache(Task task)
           
 
Method Summary
 ElfSectionHeader getSectionHeader(String name, long addr)
          Returns an ElfSectionHeader representing the ELF header for this class' Task object as given by the section name and module address in the parameters to this method.
 Task getTask()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

task

private Task task

sectionMap

private WeakHashMap sectionMap
Constructor Detail

ElfSectionCache

public ElfSectionCache(Task task)
Method Detail

getSectionHeader

public ElfSectionHeader getSectionHeader(String name,
                                         long addr)
Returns an ElfSectionHeader representing the ELF header for this class' Task object as given by the section name and module address in the parameters to this method. Also caches the headers in a WeakHashMap for later use.

Parameters:
name - The name of the section
addr - The module address
Returns:
The corresponding ElfSectionHeader

getTask

public Task getTask()