mirror of
https://github.com/Kitware/CMake.git
synced 2025-05-09 23:08:18 +08:00

- Depends on cppdap and jsoncpp. - Add --debugger argument to enable the Debugger. - Add --debugger-pipe argument for DAP traffics over named pipes. - Support breakpoints by filenames and line numbers. - Support exception breakpoints. - Call stack shows filenames and line numbers. - Show Cache Variables. - Show the state of currently defined targets, tests and directories with their properties. - Add cmakeVersion to DAP initialize response. - Include unit tests. Co-authored-by: Ben McMorran <bemcmorr@microsoft.com>
39 lines
890 B
C++
39 lines
890 B
C++
/* 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 <atomic>
|
|
#include <cstdint>
|
|
#include <list>
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
#include <cm/optional>
|
|
|
|
namespace cmDebugger {
|
|
class cmDebuggerThread;
|
|
}
|
|
|
|
namespace dap {
|
|
struct StackTraceResponse;
|
|
}
|
|
|
|
namespace cmDebugger {
|
|
|
|
class cmDebuggerThreadManager
|
|
{
|
|
static std::atomic<std::int64_t> NextThreadId;
|
|
std::list<std::shared_ptr<cmDebuggerThread>> Threads;
|
|
|
|
public:
|
|
cmDebuggerThreadManager() = default;
|
|
std::shared_ptr<cmDebuggerThread> StartThread(std::string const& name);
|
|
void EndThread(std::shared_ptr<cmDebuggerThread> const& thread);
|
|
cm::optional<dap::StackTraceResponse> GetThreadStackTraceResponse(
|
|
std::int64_t id);
|
|
};
|
|
|
|
} // namespace cmDebugger
|