/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ #pragma once #include "cmConfigure.h" // IWYU pragma: keep #include #include #include #include #include #include #include #include class cmListFileFunction; class cmMakefile; namespace cmDebugger { class cmDebuggerStackFrame; class cmDebuggerVariables; class cmDebuggerVariablesManager; } namespace cmDebugger { class cmDebuggerThread { int64_t Id; std::string Name; std::vector> Frames; std::unordered_map> FrameMap; std::mutex Mutex; std::unordered_map> FrameScopes; std::unordered_map>> FrameVariables; std::shared_ptr VariablesManager; public: cmDebuggerThread(int64_t id, std::string name); int64_t GetId() const { return this->Id; } const std::string& GetName() const { return this->Name; } void PushStackFrame(cmMakefile* mf, std::string const& sourcePath, cmListFileFunction const& lff); void PopStackFrame(); std::shared_ptr GetTopStackFrame(); std::shared_ptr GetStackFrame(int64_t frameId); size_t GetStackFrameSize() const { return this->Frames.size(); } dap::ScopesResponse GetScopesResponse(int64_t frameId, bool supportsVariableType); dap::VariablesResponse GetVariablesResponse( dap::VariablesRequest const& request); friend dap::StackTraceResponse GetStackTraceResponse( std::shared_ptr const& thread); }; } // namespace cmDebugger