mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GP-1184_emteere Allowing decompiler to produce results if HighGlobal
does not have a symref tag
This commit is contained in:
@@ -17,6 +17,7 @@ package ghidra.program.model.pcode;
|
|||||||
|
|
||||||
import ghidra.program.model.address.Address;
|
import ghidra.program.model.address.Address;
|
||||||
import ghidra.program.model.data.DataType;
|
import ghidra.program.model.data.DataType;
|
||||||
|
import ghidra.util.Msg;
|
||||||
import ghidra.util.xml.SpecXmlUtils;
|
import ghidra.util.xml.SpecXmlUtils;
|
||||||
import ghidra.xml.XmlElement;
|
import ghidra.xml.XmlElement;
|
||||||
import ghidra.xml.XmlPullParser;
|
import ghidra.xml.XmlPullParser;
|
||||||
@@ -58,10 +59,12 @@ public class HighGlobal extends HighVariable {
|
|||||||
offset = SpecXmlUtils.decodeInt(attrString);
|
offset = SpecXmlUtils.decodeInt(attrString);
|
||||||
}
|
}
|
||||||
restoreInstances(parser, el);
|
restoreInstances(parser, el);
|
||||||
if (symref == 0) {
|
if (symref != 0) {
|
||||||
throw new PcodeXMLException("Missing symref attribute in <high> tag");
|
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
|
if (symbol == null) { // If we don't already have symbol, synthesize it
|
||||||
DataType symbolType;
|
DataType symbolType;
|
||||||
int symbolSize;
|
int symbolSize;
|
||||||
|
|||||||
Reference in New Issue
Block a user