Class DwarfDecodeContext


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

      • 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 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 decoded
        encodedLength - 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