mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-4347: PeLoader now pads initialized memory blocks with 0 instead of
creating an additional uninitialized block. Also improved Bytes Source column of Memory Map.
This commit is contained in:
parent
5690528835
commit
f9ce96fd6d
9 changed files with 35 additions and 21 deletions
|
@ -179,7 +179,7 @@ class BitMappedSubMemoryBlock extends SubMemoryBlock {
|
|||
|
||||
@Override
|
||||
protected String getDescription() {
|
||||
return "Bit Mapped: " + mappedAddress;
|
||||
return "bitmap[0x%x, 0x%x, %s]".formatted(subBlockOffset, subBlockLength, mappedAddress);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -117,6 +117,6 @@ class BufferSubMemoryBlock extends SubMemoryBlock {
|
|||
|
||||
@Override
|
||||
protected String getDescription() {
|
||||
return "";
|
||||
return "init[0x%x]".formatted(subBlockLength);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -199,7 +199,7 @@ class ByteMappedSubMemoryBlock extends SubMemoryBlock {
|
|||
|
||||
@Override
|
||||
protected String getDescription() {
|
||||
return "Byte Mapped: " + mappedAddress + ", " + byteMappingScheme;
|
||||
return "bytemap[0x%x, 0x%x, %s]".formatted(subBlockOffset, subBlockLength, mappedAddress);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -112,10 +112,8 @@ class FileBytesSubMemoryBlock extends SubMemoryBlock {
|
|||
|
||||
@Override
|
||||
protected String getDescription() {
|
||||
String fileName = fileBytes.getFilename();
|
||||
|
||||
String hexString = Long.toHexString(fileBytesOffset + fileBytes.getFileOffset());
|
||||
return "File: " + fileName + ": 0x" + hexString;
|
||||
return "%s[0x%x, 0x%x]".formatted(fileBytes.getFilename(),
|
||||
fileBytesOffset + fileBytes.getFileOffset(), subBlockLength);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -86,7 +86,6 @@ class UninitializedSubMemoryBlock extends SubMemoryBlock {
|
|||
|
||||
@Override
|
||||
protected String getDescription() {
|
||||
return "";
|
||||
return "uninit[0x%x]".formatted(subBlockLength);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue