From 7595ec6dd1acd99c6c4e3b86f333eec834da7140 Mon Sep 17 00:00:00 2001 From: Xusheng Date: Mon, 7 Oct 2024 16:34:25 +0800 Subject: [PATCH] Quote and escape the string literals for the register annotation. Fix https://github.com/Vector35/debugger/issues/622 --- core/debuggercontroller.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/debuggercontroller.cpp b/core/debuggercontroller.cpp index 76c76c9..82d2480 100644 --- a/core/debuggercontroller.cpp +++ b/core/debuggercontroller.cpp @@ -2451,7 +2451,7 @@ static std::string CheckForLiteralString(uint64_t address) } if (ok) - return BinaryNinja::EscapeString(result); + return fmt::format("\"{}\"", BinaryNinja::EscapeString(result)); return ""; } @@ -2835,6 +2835,7 @@ bool DebuggerController::ComputeExprValue(const LowLevelILInstruction &instr, ui return true; } case LLIL_POP: + case LLIL_RET: { auto stackPointer = GetState()->StackPointer(); auto buffer = ReadMemory(stackPointer, instr.size);