Class LSDAHeader
java.lang.Object
ghidra.app.plugin.exceptionhandlers.gcc.GccAnalysisClass
ghidra.app.plugin.exceptionhandlers.gcc.structures.gccexcepttable.LSDAHeader
Defines the bounds of exception unwinding support, within a function,
and unwind procedures.
* lpStartAddr is the program address where support begins. This value is
encoded according to lpStartEncoding.
* ttypeAddr is the location-relative program address, encoded per
ttypeEncoding, of the associated C++ types table (types of thrown values).
-
Field Summary
-
Constructor Summary
ConstructorDescriptionLSDAHeader
(TaskMonitor monitor, Program program, RegionDescriptor region) Constructor for the LSDA header which indicates encoding for the LSDA tables. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Create a LSDA Header from the bytes ataddr
.getBody()
Gets the address range containing the LSDA header.int
Gets the dwarf encoding used for the call site table.int
Get the size of the header in the call site table.int
Gets the length of the call site table.long
Gets the size of this LSDA header.Gets the landing pad start address.int
Gets the indicator of the encoding used for the landing pad start.Gets the next address indicating the address after this LSDA header.Gets the base address of the type table.int
Gets the encoding used for the type table.int
The offset from the type offset field to get to the base address of the type table.boolean
Determines if this LSDA has a type table.Methods inherited from class ghidra.app.plugin.exceptionhandlers.gcc.GccAnalysisClass
createAndCommentData, createData, init
-
Constructor Details
-
LSDAHeader
Constructor for the LSDA header which indicates encoding for the LSDA tables.
Note: Thecreate(Address)
method must be called after constructing an LSDAHeader 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 analysis.program
- the program containing this header.region
- the region of the program associated with this header.
-
-
Method Details
-
create
Create a LSDA Header from the bytes ataddr
.
Note: This method must get called before any of the "get..." methods.- Parameters:
addr
- the start (minimum address) of this LSDA header.- Throws:
MemoryAccessException
- if memory for the header couldn't be read.
-
getNextAddress
Gets the next address indicating the address after this LSDA header.- Returns:
- the next address after this LSDA header or null if this LSDA header hasn't been created at any address yet.
-
getBody
Gets the address range containing the LSDA header.- Returns:
- the address range of the header
-
getHeaderSize
public long getHeaderSize()Gets the size of this LSDA header.- Returns:
- the header size
-
getLPStartEncoding
public int getLPStartEncoding()Gets the indicator of the encoding used for the landing pad start.- Returns:
- the LP start encoding
-
getLPStartAddress
Gets the landing pad start address.- Returns:
- the LP start address
-
hasTypeTable
public boolean hasTypeTable()Determines if this LSDA has a type table.- Returns:
- true if there is a type table
-
getTTypeEncoding
public int getTTypeEncoding()Gets the encoding used for the type table.- Returns:
- the value indicating the type table's encoding
-
getTTypeOffset
public int getTTypeOffset()The offset from the type offset field to get to the base address of the type table.- Returns:
- the type table offset
-
getTTypeBaseAddress
Gets the base address of the type table. The base address is the last byte (maximum address) of the type table. The type table is ordered in reverse.- Returns:
- the type table's base address or
Address.NO_ADDRESS
-
getCallSiteTableEncoding
public int getCallSiteTableEncoding()Gets the dwarf encoding used for the call site table.- Returns:
- the encoding value
-
getCallSiteTableLength
public int getCallSiteTableLength()Gets the length of the call site table.- Returns:
- the table length
-
getCallSiteTableHeaderSize
public int getCallSiteTableHeaderSize()Get the size of the header in the call site table.- Returns:
- the header size
-