1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-05-09 06:42:18 +08:00
CMake/Source/cmDebuggerThreadManager.h
Kitware Robot 1772622772 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 10:43:35 -05:00

40 lines
936 B
C++

/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file LICENSE.rst 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