Class LSDATable
- java.lang.Object
-
- ghidra.app.plugin.exceptionhandlers.gcc.structures.gccexcepttable.LSDATable
-
public class LSDATable extends java.lang.Object
The Language Specific Data Area (LSDA) serves as a reference to the runtime for how to respond to an exception. Each function that handles an exception (that is, has a 'catch' block) has an LSDA, and each exception-prone fragment has a record within the LSDA. The runtime will walk up the call stack as part of the Unwind routines, asking the LSDA if a function knows how to handle the thrown exception;the default handler typically terminates the program.Unwind uses the personality function and the LSDA -- the return value tells Unwind whether the function can handle the exception or not.
The LSDA is comprised of:
- A header that describes the bounds of exception handling support and encoding modes for values found later in the LSDA table
- A call site table that describes each location a 'throws' occurs and where a corresponding catch block resides, and the actions to take.
- An action table, that describes what the runtime needs to do during unwind
The structures modeled here are described in detail in the C++ ABI.
-
-
Constructor Summary
Constructors Constructor Description LSDATable(TaskMonitor monitor, Program program)
Constructor for an LSDA exception table.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
create(Address tableAddr, RegionDescriptor region)
Create a LSDA Table from the bytes ataddr
.LSDAActionTable
getActionTable()
LSDACallSiteTable
getCallSiteTable()
LSDATypeTable
getTypeTable()
-
-
-
Constructor Detail
-
LSDATable
public LSDATable(TaskMonitor monitor, Program program)
Constructor for an LSDA exception table.
Note: Thecreate(Address, DwarfEHDecoder, RegionDescriptor)
method must be called after constructing an LSDATable to associate it with an address before any of its "get..." methods are called.- Parameters:
monitor
- task monitor to see if the user has cancelled analysisprogram
- the program containing the table
-
-
Method Detail
-
create
public void create(Address tableAddr, RegionDescriptor region) throws MemoryAccessException
Create a LSDA Table from the bytes ataddr
. Parses the header, call site table, action table, and type table.
Note: This method must get called before any of the "get..." methods.- Parameters:
tableAddr
- the start (minimum address) of this LSDA table.region
- the region of the program associated with this table- Throws:
MemoryAccessException
- if memory couldn't be accessed for the LSDA table
-
getCallSiteTable
public LSDACallSiteTable getCallSiteTable()
- Returns:
- the call site table for this LSDA
-
getActionTable
public LSDAActionTable getActionTable()
- Returns:
- the action table for this LSDA
-
getTypeTable
public LSDATypeTable getTypeTable()
- Returns:
- the type table for this LSDA
-
-