Package ghidra.program.util
Class MemoryDiff
java.lang.Object
ghidra.program.util.MemoryDiff
MemoryDiff
determines where the memory differs between two programs as well as the
types of differences.-
Constructor Summary
ConstructorDescriptionMemoryDiff
(Program p1, Program p2) Constructs an object for determining memory differences between two programs. -
Method Summary
Modifier and TypeMethodDescriptiongetDifferenceInfo
(int index) Gets the memory difference flags for the address range as indicated by index.getDifferences
(Address p1Address) Gets a string representation of the types of memory differences that exist for the memory block that contains the indicated address.Returns an array of address ranges where there are memory differences.int
Gets the number of address ranges that the two programs memories are broken into for comparing the programs.Gets the first program that is part of this MemoryDiff.Gets the second program that is part of this MemoryDiff.getRange
(int index) Gets the address range as indicated by index.boolean
merge
(int row, int mergeFields, TaskMonitor monitor)
-
Constructor Details
-
MemoryDiff
Constructs an object for determining memory differences between two programs.- Parameters:
p1
- the first programp2
- the second program- Throws:
ProgramConflictException
- if the program memory can't be compared because the programs are based on different languages.
-
-
Method Details
-
getProgram1
Gets the first program that is part of this MemoryDiff.- Returns:
- the first program
-
getProgram2
Gets the second program that is part of this MemoryDiff.- Returns:
- the second program
-
getNumRanges
public int getNumRanges()Gets the number of address ranges that the two programs memories are broken into for comparing the programs.- Returns:
- the number of address ranges.
-
getRange
Gets the address range as indicated by index. The index is zero based. Address ranges are in order from the minimum address to the maximum address range.- Parameters:
index
- the index of the address range to get.- Returns:
- the address range.
-
getDifferenceInfo
Gets the memory difference flags for the address range as indicated by index.- Parameters:
index
- the index of the address range to get the difference flags for.- Returns:
- the difference flags for the indicated address range.
-
getDifferences
Gets a string representation of the types of memory differences that exist for the memory block that contains the indicated address.- Parameters:
p1Address
- address that is obtained via the first program.- Returns:
- a string indicating the types of memory differences.
-
getDifferentAddressRanges
Returns an array of address ranges where there are memory differences.- Returns:
- address ranges with differences.
-
merge
-