From 209baa99819c7fd2508b78c8805da2a9c95c4d25 Mon Sep 17 00:00:00 2001 From: Igor Kulaychuk Date: Thu, 13 Jul 2017 06:53:11 +0300 Subject: [PATCH] Enable parsing --frame argument --- src/debug/debugger/commands.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/debug/debugger/commands.cpp b/src/debug/debugger/commands.cpp index 6cfb8c8..dfa42c2 100644 --- a/src/debug/debugger/commands.cpp +++ b/src/debug/debugger/commands.cpp @@ -21,6 +21,9 @@ HRESULT DeleteBreakpoint(ULONG32 id); HRESULT CreateBreakpointInProcess(ICorDebugProcess *pProcess, std::string filename, int linenum, ULONG32 &id); HRESULT PrintBreakpoint(ULONG32 id, std::string &output); +// Frames +HRESULT GetFrameAt(ICorDebugThread *pThread, int level, ICorDebugFrame **ppFrame); + void _out_printf(const char *fmt, ...) __attribute__((format (printf, 1, 2))); @@ -208,7 +211,7 @@ static std::unordered_map commands { IfFailRet(pProcess->GetThread(threadId, &pThread)); ToRelease pFrame; - IfFailRet(pThread->GetActiveFrame(&pFrame)); + IfFailRet(GetFrameAt(pThread, GetIntArg(args, "--frame", 0), &pFrame)); IfFailRet(ListVariables(pFrame, output)); @@ -229,7 +232,7 @@ static std::unordered_map commands { IfFailRet(pProcess->GetThread(threadId, &pThread)); ToRelease pFrame; - IfFailRet(pThread->GetActiveFrame(&pFrame)); + IfFailRet(GetFrameAt(pThread, GetIntArg(args, "--frame", 0), &pFrame)); return CreateVar(pThread, pFrame, args.at(0), args.at(1), output); }}, -- 2.7.4