Class ProgramDiffDetails

java.lang.Object
ghidra.program.util.ProgramDiffDetails

public class ProgramDiffDetails extends Object
ProgramDiffDetails is used to determine the detailed differences between two programs at a particular address. The differences are determined for the extent of the code units from each program at a particular address.
  • Field Details

    • indent1

      protected String indent1
    • indent2

      protected String indent2
    • indent3

      protected String indent3
    • indent4

      protected String indent4
  • Constructor Details

    • ProgramDiffDetails

      public ProgramDiffDetails(Program p1, Program p2)
      Constructor for ProgramDiffDetails.
      Parameters:
      p1 - the original program
      p2 - the program to diff against.
  • Method Details

    • getDiffDetails

      public static String getDiffDetails(Program p1, Program p2, Address p1DiffAddress)
      Gets a string indicating the types of differences for the code units at the indicated address. The string contains information from each program where there are differences. It containing multiple lines separated by newline characters)
      Parameters:
      p1 - the original program
      p2 - the program to diff against.
      p1DiffAddress - the address that difference details are needed for. This address should be derived from program1.
      Returns:
      a string indicating the differences.
    • getDiffDetails

      public static String getDiffDetails(Program p1, Program p2, Address p1DiffAddress, ProgramDiffFilter filter)
      Gets a string indicating the types of differences for the code units at the indicated address. The string contains information from each program where there are differences. It containing multiple lines separated by newline characters)
      Parameters:
      p1 - the original program
      p2 - the program to diff against.
      p1DiffAddress - the address that difference details are needed for. This address should be derived from program1.
      filter - the program diff filter that indicates the diff details to show.
      Returns:
      a string indicating the differences.
    • getDiffDetails

      public String getDiffDetails(Address p1DiffAddress)
      Gets a string indicating the types of differences for the code units at the indicated address. The string contains information from each program where there are differences. It containing multiple lines separated by newline characters)
      Parameters:
      p1DiffAddress - the address that difference details are needed for. This address should be derived from program1.
      Returns:
      a string indicating the differences.
    • getDiffDetails

      public String getDiffDetails(Address p1DiffAddress, ProgramDiffFilter filter)
      Gets a string indicating the types of differences for the code units at the indicated address. The string contains information from each program where there are differences. It containing multiple lines separated by newline characters)
      Parameters:
      p1DiffAddress - the address that difference details are needed for. This address should be derived from program1.
      filter - the program diff filter that indicates the diff details to show.
      Returns:
      a string indicating the differences.
    • getAllDetails

      public void getAllDetails(Address p1DiffAddress, StyledDocument doc, String prefixString)
      Determine the detailed differences between the two programs at the indicated address. The differences are determined for the extent of the code units in the two programs at the indicated address.
      Parameters:
      p1DiffAddress - the address that difference details are needed for. This address should be derived from program1.
      doc - the document where the details of differences between the two programs should be written.
      prefixString - Line of text to display at beginning of the difference details information.
    • getDetails

      public void getDetails(Address p1DiffAddress, ProgramDiffFilter filter, StyledDocument doc, String prefixString)
      Determine the detailed differences between the two programs at the indicated address. The differences are determined for the extent of the code units in the two programs at the indicated address.
      Parameters:
      p1DiffAddress - the address that difference details are needed for. This address should be derived from program1.
      filter - the program diff filter that indicates the diff details to show.
      doc - the document where the details of differences between the two programs should be written.
      prefixString - Line of text to display at beginning of the difference details information.
    • getDetailsAddressSet

      public AddressSetView getDetailsAddressSet(Address p1Address)
      Gets the address set where detailed differences will be determined for details at the indicated address. An address set is returned since the indicated address may be in different sized code units in each of the two programs.
      Parameters:
      p1Address - the current address where details are desired. This address may be from program1 or program2.
      Returns:
      the program1 address set for code units containing that address within the programs being diffed.