mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
GP-1447: Added 'View all Memory' override toggle to Debugger.
This commit is contained in:
parent
59402a2951
commit
8b2af5241a
30 changed files with 674 additions and 229 deletions
|
@ -467,17 +467,17 @@ public class ByteViewerComponent extends FieldPanel implements FieldMouseListene
|
|||
// adjust the end index/field because the selection does not
|
||||
// include the end
|
||||
int endFieldOffset = endLoc.getFieldNum();
|
||||
int endIndex = endLoc.getIndex().intValue();
|
||||
BigInteger endIndex = endLoc.getIndex();
|
||||
|
||||
if (endFieldOffset == fieldFactories.length - 1) {
|
||||
endFieldOffset = 0;
|
||||
++endIndex;
|
||||
endIndex = endIndex.add(BigInteger.ONE);
|
||||
}
|
||||
else {
|
||||
++endFieldOffset;
|
||||
}
|
||||
fsel.addRange(
|
||||
new FieldLocation(startLoc.getIndex().intValue(), startLoc.getFieldNum(), 0, 0),
|
||||
new FieldLocation(startLoc.getIndex(), startLoc.getFieldNum(), 0, 0),
|
||||
new FieldLocation(endIndex, endFieldOffset, 0, 0));
|
||||
}
|
||||
return fsel;
|
||||
|
|
|
@ -125,7 +125,7 @@ public class ByteViewerLayoutModel implements LayoutModel {
|
|||
if (index.compareTo(numIndexes) >= 0) {
|
||||
return null;
|
||||
}
|
||||
List<Field> fields = new ArrayList<Field>(8);
|
||||
List<Field> fields = new ArrayList<Field>(factorys.length);
|
||||
for (FieldFactory factory : factorys) {
|
||||
Field field = factory.getField(index);
|
||||
if (field != null) {
|
||||
|
|
|
@ -91,14 +91,7 @@ public class MemoryByteBlock implements ByteBlock {
|
|||
*/
|
||||
@Override
|
||||
public BigInteger getLength() {
|
||||
|
||||
long size = block.getSize();
|
||||
if (size < 0) {
|
||||
return BigInteger.valueOf(size + 0x8000000000000000L)
|
||||
.subtract(
|
||||
BigInteger.valueOf(0x8000000000000000L));
|
||||
}
|
||||
return BigInteger.valueOf(size);
|
||||
return block.getSizeAsBigInteger();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue