From fdf7121cc7e6472672fb9c8a25e6e33b5e87ca93 Mon Sep 17 00:00:00 2001 From: caheckman <48068198+caheckman@users.noreply.github.com> Date: Wed, 2 Jun 2021 16:28:25 -0400 Subject: [PATCH] Make sure EquateSymbols are locked --- Ghidra/Features/Decompiler/src/decompile/cpp/database.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/database.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/database.cc index 1b4ec7b834..0821ced293 100644 --- a/Ghidra/Features/Decompiler/src/decompile/cpp/database.cc +++ b/Ghidra/Features/Decompiler/src/decompile/cpp/database.cc @@ -1969,6 +1969,12 @@ void ScopeInternal::clearUnlocked(void) if (sym->isSizeTypeLocked()) resetSizeLockType(sym); } + else if (sym->getCategory() == 1) { + // Note we treat EquateSymbols as locked for purposes of this method + // as a typelock (which traditionally prevents a symbol from being cleared) + // does not make sense for an equate + continue; + } else removeSymbol(sym); }