From: Igor Kulaychuk Date: Tue, 16 Jan 2018 21:30:08 +0000 (+0300) Subject: Make methods SetJustMyCode/IsJustMyCode non-static X-Git-Tag: submit/tizen/20180620.071641~54 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=24955116b5a29b7c3daef22fd686a7fefff57aeb;p=sdk%2Ftools%2Fnetcoredbg.git Make methods SetJustMyCode/IsJustMyCode non-static --- diff --git a/src/debug/netcoredbg/commands.cpp b/src/debug/netcoredbg/commands.cpp index b4cf4c1..5062d70 100644 --- a/src/debug/netcoredbg/commands.cpp +++ b/src/debug/netcoredbg/commands.cpp @@ -179,7 +179,7 @@ HRESULT Debugger::SetupStep(ICorDebugThread *pThread, Debugger::StepType stepTyp ToRelease pStepper2; IfFailRet(pStepper->QueryInterface(IID_ICorDebugStepper2, (LPVOID *)&pStepper2)); - IfFailRet(pStepper2->SetJMC(Debugger::IsJustMyCode())); + IfFailRet(pStepper2->SetJMC(IsJustMyCode())); if (stepType == STEP_OUT) { @@ -778,7 +778,7 @@ HRESULT MIProtocol::HandleCommand(std::string command, { if (args.at(0) == "just-my-code") { - Debugger::SetJustMyCode(args.at(1) == "1"); + m_debugger->SetJustMyCode(args.at(1) == "1"); } } return S_OK; diff --git a/src/debug/netcoredbg/debugger.h b/src/debug/netcoredbg/debugger.h index 76999f8..7e1bd84 100644 --- a/src/debug/netcoredbg/debugger.h +++ b/src/debug/netcoredbg/debugger.h @@ -24,7 +24,7 @@ private: ICorDebug *m_pDebug; ICorDebugProcess *m_pProcess; - static bool m_justMyCode; + bool m_justMyCode; std::mutex m_startupMutex; std::condition_variable m_startupCV; @@ -91,7 +91,7 @@ private: void Cleanup(); - static HRESULT SetupStep(ICorDebugThread *pThread, StepType stepType); + HRESULT SetupStep(ICorDebugThread *pThread, StepType stepType); HRESULT GetStackVariables(uint64_t frameId, ICorDebugThread *pThread, ICorDebugFrame *pFrame, int start, int count, std::vector &variables); HRESULT GetChildren(VariableReference &ref, ICorDebugThread *pThread, ICorDebugFrame *pFrame, int start, int count, std::vector &variables); @@ -124,12 +124,12 @@ private: HRESULT RunClassConstructor(ICorDebugThread *pThread, ICorDebugValue *pValue); public: - static bool IsJustMyCode() { return m_justMyCode; } - static void SetJustMyCode(bool enable) { m_justMyCode = enable; } - Debugger(); ~Debugger(); + bool IsJustMyCode() { return m_justMyCode; } + void SetJustMyCode(bool enable) { m_justMyCode = enable; } + void TryResolveBreakpointsForModule(ICorDebugModule *pModule); void SetProtocol(Protocol *protocol) { m_protocol = protocol; } diff --git a/src/debug/netcoredbg/main.cpp b/src/debug/netcoredbg/main.cpp index 2ee4b2e..44b5029 100644 --- a/src/debug/netcoredbg/main.cpp +++ b/src/debug/netcoredbg/main.cpp @@ -370,9 +370,9 @@ public: const bool no_source = Status == S_FALSE; - if (Debugger::IsJustMyCode() && no_source) + if (m_debugger->IsJustMyCode() && no_source) { - Debugger::SetupStep(pThread, Debugger::STEP_OVER); + m_debugger->SetupStep(pThread, Debugger::STEP_OVER); pAppDomain->Continue(0); } else @@ -676,12 +676,11 @@ public: /* [in] */ ICorDebugMDA *pMDA) { HandleEvent(pController, "MDANotification"); return S_OK; } }; -bool Debugger::m_justMyCode = true; - Debugger::Debugger() : m_managedCallback(new ManagedCallback()), m_pDebug(nullptr), m_pProcess(nullptr), + m_justMyCode(true), m_startupReady(false), m_startupResult(S_OK), m_unregisterToken(nullptr),