mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 09:49:23 +02:00
GP-5176: Hovering on addresses in the Listing now show offsets in both
decimal and hexadecimal
This commit is contained in:
parent
c5b753e881
commit
69ee044f29
1 changed files with 11 additions and 4 deletions
|
@ -178,12 +178,19 @@ public class ProgramAddressRelationshipListingHover extends AbstractConfigurable
|
|||
if (reference != null) {
|
||||
sb.append(italic(reference)).append(" ");
|
||||
}
|
||||
sb.append(formatOffset(offset));
|
||||
sb.append(formatHexOffset(offset));
|
||||
sb.append("</td>");
|
||||
sb.append("<td style=\"text-align: right;\">");
|
||||
sb.append(formatDecimalOffset(offset));
|
||||
sb.append("</td></tr>");
|
||||
}
|
||||
|
||||
private static String formatOffset(long offset) {
|
||||
private static String formatHexOffset(long offset) {
|
||||
return String.format("+%xh", offset);
|
||||
}
|
||||
|
||||
private static String formatDecimalOffset(long offset) {
|
||||
return String.format("(+%d)", offset);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue