mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
GP-0: Fix tests.
This commit is contained in:
parent
00afebac48
commit
493f21b9c6
4 changed files with 23 additions and 4 deletions
|
@ -224,6 +224,10 @@ public abstract class AbstractGhidraHeadedDebuggerTest
|
|||
return new AddressRangeImpl(addr(program, min), addr(program, max));
|
||||
}
|
||||
|
||||
protected static AddressRange rng(Address min, long length) throws AddressOverflowException {
|
||||
return new AddressRangeImpl(min, length);
|
||||
}
|
||||
|
||||
protected static AddressSetView set(AddressRange... ranges) {
|
||||
AddressSet set = new AddressSet();
|
||||
for (AddressRange rng : ranges) {
|
||||
|
@ -232,6 +236,13 @@ public abstract class AbstractGhidraHeadedDebuggerTest
|
|||
return set;
|
||||
}
|
||||
|
||||
protected static AddressRange quantize(AddressRange rng, long page) {
|
||||
AddressSpace space = rng.getAddressSpace();
|
||||
long min = Long.divideUnsigned(rng.getMinAddress().getOffset(), page) * page;
|
||||
long max = Long.divideUnsigned(rng.getMaxAddress().getOffset() + page - 1, page) * page - 1;
|
||||
return new AddressRangeImpl(space.getAddress(min), space.getAddress(max));
|
||||
}
|
||||
|
||||
public static Language getToyBE64Language() {
|
||||
try {
|
||||
return DefaultLanguageService.getLanguageService()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue