Merge remote-tracking branch 'origin/patch'

Conflicts:
	Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/help/ProcessorListPlugin.java
	Ghidra/Framework/Gui/src/main/java/ghidra/util/HTMLUtilities.java
This commit is contained in:
Ryan Kurtz 2024-02-07 11:18:36 -05:00
commit 80d1031d01
50 changed files with 713 additions and 388 deletions

View file

@ -102,13 +102,22 @@ public class ByteViewerComponent extends FieldPanel implements FieldMouseListene
ByteBlockInfo info = indexMap.getBlockInfo(fieldLoc.getIndex(), fieldLoc.getFieldNum());
if (info != null) {
String modelName = model.getName();
return modelName + " format at " +
info.getBlock().getLocationRepresentation(info.getOffset()) + ", value = " +
field.getText();
String location = getAccessibleLocationInfo(info.getBlock(), info.getOffset());
return modelName + " format at " + location;
}
return null;
}
private String getAccessibleLocationInfo(ByteBlock block, BigInteger offset) {
if (block instanceof MemoryByteBlock memBlock) {
// location represents an address, remove leading zeros to make screen reading concise
Address address = memBlock.getAddress(offset);
return address.toString(address.getAddressSpace().showSpaceName(), 1);
}
// otherwise use generic location representation
return block.getLocationRepresentation(offset);
}
@Override
public void buttonPressed(FieldLocation fieldLocation, Field field, MouseEvent mouseEvent) {
if (fieldLocation == null || field == null) {