Class DwarfDecodeContext

java.lang.Object
ghidra.app.plugin.exceptionhandlers.gcc.DwarfDecodeContext

public class DwarfDecodeContext extends Object
Organizational class to record vital data used by a DwarfEHDecoder.
  • Constructor Details

    • DwarfDecodeContext

      public DwarfDecodeContext(Program program, Address readAddr)
      Constructs a Dwarf decode context.
      Parameters:
      program - the program containing the encoded data
      readAddr - 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 data
      readAddr - the address of the encoded data
      ehBlock - 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 data
      readAddr - the address of the encoded data
      entryPoint - 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 data
      readAddr - the address of the encoded data
      function - 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 data
      readAddr - the address of the encoded data
      ehBlock - the exception handling memory block
      entryPoint - 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 data
      length - 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 data
      length - the length of the encoded data
      ehBlock - the exception handling memory block
      entryPoint - the function entry point
  • Method Details

    • 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(Object value, int encodedLength)
      Set the value and value-length after decode
      Parameters:
      value - The integer-value having been decoded
      encodedLength - The length of the encoded integer-value
    • getDecodedValue

      public 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