From: Igor Kulaychuk Date: Thu, 13 Jul 2017 03:53:11 +0000 (+0300) Subject: Enable parsing --frame argument X-Git-Tag: submit/tizen/20180620.071641~198 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=209baa99819c7fd2508b78c8805da2a9c95c4d25;p=sdk%2Ftools%2Fnetcoredbg.git Enable parsing --frame argument --- 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); }},