Class AssemblyNumericSymbols
java.lang.Object
ghidra.app.plugin.assembler.sleigh.symbol.AssemblyNumericSymbols
A context to hold various symbols offered to the assembler, usable where numbers are expected.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final AssemblyNumericSymbols
final NavigableMap
<String, Set<Address>> final NavigableMap
<String, Set<Long>> -
Method Summary
Modifier and TypeMethodDescriptionchoose
(String name, AddressSpace space) Choose a symbol with the given name, using the space as a hintChoose any symbol with the given namechooseBySpace
(String name, AddressSpace space) Choose a label with the given name in the given spacestatic AssemblyNumericSymbols
fromLanguage
(Language language) Get symbols from a language, when no program is availablestatic AssemblyNumericSymbols
fromProgram
(Program program) Get symbols from a program (and its language)getSuggestions
(String got, AddressSpace space, int max) Suggest up to max symbols having the given prefix, using space as a hintsuggestAny
(String got, int max) Suggest up to max symbols having the given prefixsuggestBySpace
(String got, AddressSpace space, int max) Suggest up to max symbols from the given space having the given prefix
-
Field Details
-
EMPTY
-
programEquates
-
languageLabels
-
-
Method Details
-
fromLanguage
Get symbols from a language, when no program is available- Parameters:
language
- the language- Returns:
- the symbols
-
fromProgram
Get symbols from a program (and its language)- Parameters:
program
- the program- Returns:
- the symbols
-
chooseAll
Choose any symbol with the given nameThis will order equates first, then program labels, then language labels. For addresses, the value is its addressable word offset.
- Parameters:
name
- the name- Returns:
- the value, or null
-
chooseBySpace
Choose a label with the given name in the given space- Parameters:
name
- the namespace
- the address space- Returns:
- the addressable word offset of the found label, or null
-
choose
Choose a symbol with the given name, using the space as a hintIf a space is not given, or if that space is the constant space, then this will choose from all symbols, via
chooseAll(String)
. If a space is given, and it is not the constant space, then this will choose from symbols in the given space, viachooseBySpace(String, AddressSpace)
.- Parameters:
name
- the namespace
- the address space, or null- Returns:
- the equate value, or label addressable word offset, or null
-
suggestAny
Suggest up to max symbols having the given prefix- Parameters:
got
- the prefixmax
- the maximum number of symbols to suggest- Returns:
- the collection of symbol names
-
suggestBySpace
Suggest up to max symbols from the given space having the given prefix- Parameters:
got
- the prefixspace
- the address spacemax
- the maximum number of symbols to suggest- Returns:
- the collection of symbol names
-
getSuggestions
Suggest up to max symbols having the given prefix, using space as a hintAs in
chooseAll(String)
, if space is null or the constant space, then this will suggest from all symbols, viasuggestAny(String, int)
. If space is given, and it is not the constant space, then this will suggest from symbols in the given space, viasuggestBySpace(String, AddressSpace, int)
.- Parameters:
got
- the prefixspace
- the space, or nullmax
- the maximum number of symbols to suggest- Returns:
- the collection of symbol names
-