mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
cmake: Add debugger
- 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>
This commit is contained in:
38
Source/cmDebuggerThreadManager.h
Normal file
38
Source/cmDebuggerThreadManager.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/* 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
|
||||
Reference in New Issue
Block a user