com.pnfsoftware.jeb.core.units.code.asm.analyzer.ILabelManager |
Definition of a code label manager. Labels are strings associated to a memory address.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract Collection<String> |
getAlternateLabels(long address)
Get the alternate labels set at the provided address.
| ||||||||||
abstract String |
getLabel(long address, long addressDelta, AutoLabelPolicy policy)
Retrieve the label at a given memory address.
| ||||||||||
abstract String |
getLabel(INativeMemoryItem item, long addressDelta, AutoLabelPolicy policy)
Retrieve the label at the address of the provided memory item.
| ||||||||||
abstract Map<Long, String> |
getPrimaryLabels()
Retrieve a copy of the primary labels map.
| ||||||||||
abstract boolean |
isLegalLabel(String label)
Verify if the provided string is a legal label.
| ||||||||||
abstract boolean |
isLegalLabel(String label, Long address, StringBuilder legalized)
Verify if the provided string is a legal label when used at the provided address.
| ||||||||||
abstract boolean |
removeLabel(long address)
Remove all the labels associated to the given address.
| ||||||||||
abstract Long |
resolveLabel(String label)
Determine the memory address associated with the provided label.
| ||||||||||
abstract boolean |
setLabel(long address, String label, boolean allowAdjusting, boolean allowAlternates, boolean mustBePrimary)
Attach a label at a given address.
|
Get the alternate labels set at the provided address. The primary label is not provided.
Retrieve the label at a given memory address.
policy | determine whether a label should be -created and- returned if none was set |
---|
Retrieve the label at the address of the provided memory item.
policy | determine whether a label should be -created and- returned if none was set |
---|
Retrieve a copy of the primary labels map.
Verify if the provided string is a legal label. Same as
isLegalLabel(label, null, null)
.
label | non-null label to be tested |
---|
Verify if the provided string is a legal label when used at the provided address.
label | non-null label to be tested |
---|---|
address | optional address, null if none |
legalized | optional output buffer that will contain a legalized version of the input label, if the input label was illegal |
Remove all the labels associated to the given address.
Determine the memory address associated with the provided label.
Attach a label at a given address.
address | memory address |
---|---|
label | label string |
allowAdjusting | if true, the label will be adjusted if a conflict arises (eg, duplicate label, illegal label string) |