GP-1447: Added 'View all Memory' override toggle to Debugger.

This commit is contained in:
Dan 2021-11-23 10:49:00 -05:00
parent 59402a2951
commit 8b2af5241a
30 changed files with 674 additions and 229 deletions

View file

@ -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;

View file

@ -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) {

View file

@ -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();
}
/**