Package ghidra.app.util.viewer.field
Class LabelCodeUnitFormat
java.lang.Object
ghidra.program.model.listing.CodeUnitFormat
ghidra.app.util.viewer.field.BrowserCodeUnitFormat
ghidra.app.util.viewer.field.LabelCodeUnitFormat
A version of
BrowserCodeUnitFormat
that changes how labels are rendered in offcut
situations.-
Field Summary
Fields inherited from class ghidra.program.model.listing.CodeUnitFormat
DEFAULT, EXTENDED_INDIRECT_REFERENCE_DELIMITER, EXTENDED_REFERENCE_DELIMITER, options, PLUS, UNDERSCORE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
getOffcutDataString
(Address offcutAddress, Data data) protected String
getOffcutLabelStringForInstruction
(Address offcutAddress, Instruction instruction, Address markupAddress) Generate label string.Methods inherited from class ghidra.app.util.viewer.field.BrowserCodeUnitFormat
addChangeListener, removeChangeListener
Methods inherited from class ghidra.program.model.listing.CodeUnitFormat
addOffcutInformation, getDataValueRepresentation, getDataValueRepresentationString, getDefaultOffcutString, getMnemonicRepresentation, getOffcutLabelString, getOperandRepresentationList, getOperandRepresentationString, getPrefixForStringData, getReferenceRepresentationString, getRepresentationString, getRepresentationString, getShowBlockName
-
Constructor Details
-
LabelCodeUnitFormat
-
-
Method Details
-
getOffcutLabelStringForInstruction
protected String getOffcutLabelStringForInstruction(Address offcutAddress, Instruction instruction, Address markupAddress) Description copied from class:CodeUnitFormat
Generate label string. This may serve two use cases:- Generating operand label at markupAddress for referenced instruction and offcutAddress
- Generating offcut label for an offcutAddress with instruction (markupAddress=null)
- Overrides:
getOffcutLabelStringForInstruction
in classCodeUnitFormat
- Parameters:
offcutAddress
- address for which generated label representsinstruction
- instruction containing offcut addressmarkupAddress
- address where a label will be referenced from (may be null)- Returns:
- generated offcut label
-
getOffcutDataString
- Overrides:
getOffcutDataString
in classCodeUnitFormat
-