Class DwarfDecodeContext
- java.lang.Object
-
- ghidra.app.plugin.exceptionhandlers.gcc.DwarfDecodeContext
-
public class DwarfDecodeContext extends java.lang.ObjectOrganizational class to record vital data used by a DwarfEHDecoder.
-
-
Constructor Summary
Constructors Constructor Description DwarfDecodeContext(Program program, Address readAddr)Constructs a Dwarf decode context.DwarfDecodeContext(Program program, Address readAddr, Address entryPoint)Constructs a Dwarf decode context.DwarfDecodeContext(Program program, Address readAddr, Function function)Constructs a Dwarf decode context.DwarfDecodeContext(Program program, Address readAddr, MemoryBlock ehBlock)Constructs a Dwarf decode context.DwarfDecodeContext(Program program, Address readAddr, MemoryBlock ehBlock, Address entryPoint)Constructs a Dwarf decode context.DwarfDecodeContext(MemBuffer buffer, int length)Constructs a Dwarf decode context.DwarfDecodeContext(MemBuffer buf, int length, MemoryBlock ehBlock, Address entryPoint)Constructs a Dwarf decode context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AddressgetAddress()Gets the min address of the encoded data.java.lang.ObjectgetDecodedValue()Gets the decoded value that is at the address.MemoryBlockgetEhBlock()Gets the exception handling memory block with this dwarf encoded data.intgetEncodedLength()Gets the length of the encoded data that is at the address.AddressgetFunctionEntryPoint()Gets the associated function's entry point.longgetOriginalImageBaseOffset()Gets the offset from the programs image base and the dwarf original image baseProgramgetProgram()Gets the program containing the encoded data.voidsetDecodedValue(java.lang.Object value, int encodedLength)Set the value and value-length after decode
-
-
-
Constructor Detail
-
DwarfDecodeContext
public DwarfDecodeContext(Program program, Address readAddr)
Constructs a Dwarf decode context.- Parameters:
program- the program containing the encoded datareadAddr- the address of the encoded data
-
DwarfDecodeContext
public DwarfDecodeContext(Program program, Address readAddr, MemoryBlock ehBlock)
Constructs a Dwarf decode context.- Parameters:
program- the program containing the encoded datareadAddr- the address of the encoded dataehBlock- the exception handling memory block
-
DwarfDecodeContext
public DwarfDecodeContext(Program program, Address readAddr, Address entryPoint)
Constructs a Dwarf decode context.- Parameters:
program- the program containing the encoded datareadAddr- the address of the encoded dataentryPoint- the associated function's entry point
-
DwarfDecodeContext
public DwarfDecodeContext(Program program, Address readAddr, Function function)
Constructs a Dwarf decode context.- Parameters:
program- the program containing the encoded datareadAddr- the address of the encoded datafunction- the associated function
-
DwarfDecodeContext
public DwarfDecodeContext(Program program, Address readAddr, MemoryBlock ehBlock, Address entryPoint)
Constructs a Dwarf decode context.- Parameters:
program- the program containing the encoded datareadAddr- the address of the encoded dataehBlock- the exception handling memory blockentryPoint- the associated function's entry point
-
DwarfDecodeContext
public DwarfDecodeContext(MemBuffer buffer, int length)
Constructs a Dwarf decode context.- Parameters:
buffer- the memory buffer which provides the program and address of the encoded datalength- the length of the encoded data
-
DwarfDecodeContext
public DwarfDecodeContext(MemBuffer buf, int length, MemoryBlock ehBlock, Address entryPoint)
Constructs a Dwarf decode context.- Parameters:
buf- the memory buffer which provides the program and address of the encoded datalength- the length of the encoded dataehBlock- the exception handling memory blockentryPoint- the function entry point
-
-
Method Detail
-
getProgram
public Program getProgram()
Gets the program containing the encoded data.- Returns:
- the program
-
getAddress
public Address getAddress()
Gets the min address of the encoded data.- Returns:
- the address
-
setDecodedValue
public void setDecodedValue(java.lang.Object value, int encodedLength)Set the value and value-length after decode- Parameters:
value- The integer-value having been decodedencodedLength- The length of the encoded integer-value
-
getDecodedValue
public java.lang.Object getDecodedValue()
Gets the decoded value that is at the address.- Returns:
- the decoded value
-
getEncodedLength
public int getEncodedLength()
Gets the length of the encoded data that is at the address.- Returns:
- the encoded data's length
-
getEhBlock
public MemoryBlock getEhBlock()
Gets the exception handling memory block with this dwarf encoded data.- Returns:
- the memory block
-
getFunctionEntryPoint
public Address getFunctionEntryPoint()
Gets the associated function's entry point.- Returns:
- the entry point address
-
getOriginalImageBaseOffset
public long getOriginalImageBaseOffset()
Gets the offset from the programs image base and the dwarf original image base- Returns:
- offset that if added to the current image base would be the original dwarf image base
-
-