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

Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`, now with "east const" enforcement. Use `clang-format` version 18. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit. Issue: #26123
40 lines
938 B
C++
40 lines
938 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 StackTraceRequest;
|
|
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(
|
|
dap::StackTraceRequest const& request);
|
|
};
|
|
|
|
} // namespace cmDebugger
|