Merge remote-tracking branch

'origin/GP-1184_emteere_IgnoreMissingSymref' into patch
This commit is contained in:
ghidra1
2021-08-03 19:21:50 -04:00

View File

@@ -17,6 +17,7 @@ package ghidra.program.model.pcode;
import ghidra.program.model.address.Address;
import ghidra.program.model.data.DataType;
import ghidra.util.Msg;
import ghidra.util.xml.SpecXmlUtils;
import ghidra.xml.XmlElement;
import ghidra.xml.XmlPullParser;
@@ -58,10 +59,12 @@ public class HighGlobal extends HighVariable {
offset = SpecXmlUtils.decodeInt(attrString);
}
restoreInstances(parser, el);
if (symref == 0) {
throw new PcodeXMLException("Missing symref attribute in <high> tag");
if (symref != 0) {
symbol = function.getGlobalSymbolMap().getSymbol(symref);
}
else {
Msg.warn(this, "Missing symref attribute in <high> tag");
}
symbol = function.getGlobalSymbolMap().getSymbol(symref);
if (symbol == null) { // If we don't already have symbol, synthesize it
DataType symbolType;
int symbolSize;