mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-01 07:25:10 +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) {
|
Namespace namespace, int row, int charOffset) {
|
||||||
|
|
||||||
super(program, addr, componentPath, row, 0, charOffset);
|
super(program, addr, componentPath, row, 0, charOffset);
|
||||||
if (namespace == null || namespace.isGlobal()) {
|
SymbolPath nsPath = null;
|
||||||
symbolPath = new SymbolPath(label);
|
if (namespace != null && !namespace.isGlobal()) {
|
||||||
}
|
nsPath = new SymbolPath(namespace.getSymbol());
|
||||||
else {
|
|
||||||
symbolPath = new SymbolPath(new SymbolPath(namespace.getSymbol()), label);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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