Class MzRelocation

java.lang.Object
ghidra.app.util.bin.format.mz.MzRelocation
All Implemented Interfaces:
StructConverter

public class MzRelocation extends Object implements StructConverter
  • Field Details

  • Constructor Details

    • MzRelocation

      public MzRelocation(BinaryReader reader) throws IOException
      Constructs a new old-style MZ relocation
      Parameters:
      reader - A BinaryReader positioned at the start of the relocation
      Throws:
      IOException - if there was an IO-related error
  • Method Details

    • getSegment

      public int getSegment()
      Gets the segment
      Returns:
      The segment
    • getOffset

      public int getOffset()
      Gets the offset
      Returns:
      The offset
    • toDataType

      public DataType toDataType() throws DuplicateNameException
      Description copied from interface: StructConverter
      Returns a structure datatype representing the contents of the implementor of this interface.

      For example, given:

       class A {
           int foo;
           double bar;
       }
       

      The return value should be a structure data type with two data type components; an INT and a DOUBLE. The structure should contain field names and, if possible, field comments.

      Specified by:
      toDataType in interface StructConverter
      Returns:
      returns a structure datatype representing the implementor of this interface
      Throws:
      DuplicateNameException - when a datatype of the same name already exists
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object