Class LSDATable
java.lang.Object
ghidra.app.plugin.exceptionhandlers.gcc.structures.gccexcepttable.LSDATable
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
ConstructorDescriptionLSDATable
(TaskMonitor monitor, Program program) Constructor for an LSDA exception table. -
Method Summary
Modifier and TypeMethodDescriptionvoid
create
(Address tableAddr, RegionDescriptor region) Create a LSDA Table from the bytes ataddr
.
-
Constructor Details
-
LSDATable
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 Details
-
create
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
- Returns:
- the call site table for this LSDA
-
getActionTable
- Returns:
- the action table for this LSDA
-
getTypeTable
- Returns:
- the type table for this LSDA
-