From bfd83ee1f64ca967e76755520fe779be8028600d Mon Sep 17 00:00:00 2001 From: emteere <47253321+emteere@users.noreply.github.com> Date: Tue, 3 Aug 2021 22:13:01 +0000 Subject: [PATCH] GP-1184_emteere Allowing decompiler to produce results if HighGlobal does not have a symref tag --- .../main/java/ghidra/program/model/pcode/HighGlobal.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/HighGlobal.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/HighGlobal.java index 54a236ae44..2177eddb6f 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/HighGlobal.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/HighGlobal.java @@ -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 tag"); + if (symref != 0) { + symbol = function.getGlobalSymbolMap().getSymbol(symref); + } + else { + Msg.warn(this, "Missing symref attribute in tag"); } - symbol = function.getGlobalSymbolMap().getSymbol(symref); if (symbol == null) { // If we don't already have symbol, synthesize it DataType symbolType; int symbolSize;