mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-20 10:37:27 +08:00
GP-6448 - Fix for label names that have namespace delimiters
This commit is contained in:
+9
-5
@@ -54,12 +54,16 @@ public class LabelFieldLocation extends CodeUnitLocation {
|
||||
Namespace namespace, int row, int charOffset) {
|
||||
|
||||
super(program, addr, componentPath, row, 0, charOffset);
|
||||
if (namespace == null || namespace.isGlobal()) {
|
||||
symbolPath = new SymbolPath(label);
|
||||
}
|
||||
else {
|
||||
symbolPath = new SymbolPath(new SymbolPath(namespace.getSymbol()), label);
|
||||
SymbolPath nsPath = null;
|
||||
if (namespace != null && !namespace.isGlobal()) {
|
||||
nsPath = new SymbolPath(namespace.getSymbol());
|
||||
}
|
||||
|
||||
// Note: use the constructor that does not parse the name. Assume all label field
|
||||
// locations are for existing symbol names or those that otherwise should not need to be
|
||||
// parsed. Parsing for existing symbols may incorrectly split on namespace delimiters that
|
||||
// are part of the symbol name.
|
||||
symbolPath = new SymbolPath(nsPath, label);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user