Ghidra is a software reverse engineering (SRE) framework
GP-0: Fix tests broken by agressive Sleigh symbol check.
Dane259fbd65cae
diff --git a/Ghidra/Debug/Debugger/src/main/java/ghidra/pcode/exec/DebuggerPcodeUtils.java b/Ghidra/Debug/Debugger/src/main/java/ghidra/pcode/exec/DebuggerPcodeUtils.javaindex 177857ed5f..d79cebc9f2 100644--- a/Ghidra/Debug/Debugger/src/main/java/ghidra/pcode/exec/DebuggerPcodeUtils.java+++ b/Ghidra/Debug/Debugger/src/main/java/ghidra/pcode/exec/DebuggerPcodeUtils.java@@ -98,6 +98,14 @@ public enum DebuggerPcodeUtils {symbol = findUserSymbol(nm);}if (symbol == null) {+ /**+ * TODO: This may break things that check for the absence of a symbol+ *+ * I don't think it'll affect expressions, but it could later affect user Sleigh+ * libraries than an expression might like to use. The better approach would be+ * to incorporate a better error message into the Sleigh compiler, but it won't+ * always know the use case for a clear message.+ */throw new SleighException("Unknown register or label: '" + nm + "'");}return symbol;diff --git a/Ghidra/Framework/Emulation/src/main/java/ghidra/pcode/exec/SleighProgramCompiler.java b/Ghidra/Framework/Emulation/src/main/java/ghidra/pcode/exec/SleighProgramCompiler.javaindex ae623db85a..c9fec4cd45 100644--- a/Ghidra/Framework/Emulation/src/main/java/ghidra/pcode/exec/SleighProgramCompiler.java+++ b/Ghidra/Framework/Emulation/src/main/java/ghidra/pcode/exec/SleighProgramCompiler.java@@ -125,15 +125,6 @@ public enum SleighProgramCompiler {}}}-- @Override- public SleighSymbol findSymbol(String nm) {- SleighSymbol symbol = super.findSymbol(nm);- if (symbol == null) {- throw new SleighException("Unknown register: '" + nm + "'");- }- return symbol;- }}/**