Interface ILabelManager
Definition of a code label manager. Labels are strings associated to a memory address.
-
Method Summary
Modifier and TypeMethodDescriptiongetAlternateLabels
(long address) Get the alternate labels set at the provided address.getLabel
(long address, long addressDelta, AutoLabelPolicy policy) Retrieve the label at a given memory address.getLabel
(INativeMemoryItem item, long addressDelta, AutoLabelPolicy policy) Retrieve the label at the address of the provided memory item.Retrieve a copy of the primary labels map.default boolean
isLegalLabel
(String label) Verify if the provided string is a legal label.boolean
isLegalLabel
(String label, Long address, StringBuilder legalized) Verify if the provided string is a legal label when used at the provided address.boolean
removeLabel
(long address) Remove all the labels associated to the given address.resolveLabel
(String label) Determine the memory address associated with the provided label.boolean
setLabel
(long address, String label, boolean allowAdjusting, boolean allowAlternates, boolean mustBePrimary) Attach a label at a given address.
-
Method Details
-
getPrimaryLabels
Retrieve a copy of the primary labels map.- Returns:
-
getLabel
Retrieve the label at a given memory address.- Parameters:
address
-addressDelta
-policy
- determine whether a label should be -created and- returned if none was set- Returns:
- a label or null
-
getLabel
Retrieve the label at the address of the provided memory item.- Parameters:
item
-addressDelta
-policy
- determine whether a label should be -created and- returned if none was set- Returns:
- a label or null
-
getAlternateLabels
Get the alternate labels set at the provided address. The primary label is not provided.- Parameters:
address
-- Returns:
- a collection of labels, potentially null (never empty)
-
setLabel
boolean setLabel(long address, String label, boolean allowAdjusting, boolean allowAlternates, boolean mustBePrimary) Attach a label at a given address.- Parameters:
address
- memory addresslabel
- label stringallowAdjusting
- if true, the label will be adjusted if a conflict arises (eg, duplicate label, illegal label string)allowAlternates
-mustBePrimary
-- Returns:
- success indicator
-
removeLabel
boolean removeLabel(long address) Remove all the labels associated to the given address.- Parameters:
address
-- Returns:
- always true
-
resolveLabel
Determine the memory address associated with the provided label.- Parameters:
label
-- Returns:
- the address, or null on error
-
isLegalLabel
Verify if the provided string is a legal label. Same asisLegalLabel(label, null, null)
.- Parameters:
label
- non-null label to be tested- Returns:
-
isLegalLabel
Verify if the provided string is a legal label when used at the provided address.- Parameters:
label
- non-null label to be testedaddress
- optional address, null if nonelegalized
- optional output buffer that will contain a legalized version of the input label, if the input label was illegal- Returns:
-