diff options
author | Glen Chung <kuchung@microsoft.com> | 2023-03-16 00:50:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-05-30 13:46:12 (GMT) |
commit | a9a592f96e6498da302f8e968be1db0ad3c32123 (patch) | |
tree | 0d75f16ee2eae99b1a3f063e575b3f5f8f2ee931 /Source/cmMessenger.h | |
parent | b0d1ddb7234950374977b83f8dbded806c15b356 (diff) | |
download | CMake-a9a592f96e6498da302f8e968be1db0ad3c32123.zip CMake-a9a592f96e6498da302f8e968be1db0ad3c32123.tar.gz CMake-a9a592f96e6498da302f8e968be1db0ad3c32123.tar.bz2 |
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>
Diffstat (limited to 'Source/cmMessenger.h')
-rw-r--r-- | Source/cmMessenger.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmMessenger.h b/Source/cmMessenger.h index 451add0..bdefb00 100644 --- a/Source/cmMessenger.h +++ b/Source/cmMessenger.h @@ -5,6 +5,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include <iosfwd> +#include <memory> #include <string> #include <cm/optional> @@ -12,6 +13,12 @@ #include "cmListFileCache.h" #include "cmMessageType.h" +#ifdef CMake_ENABLE_DEBUGGER +namespace cmDebugger { +class cmDebuggerAdapter; +} +#endif + class cmMessenger { public: @@ -55,6 +62,13 @@ public: // Print the top of a backtrace. void PrintBacktraceTitle(std::ostream& out, cmListFileBacktrace const& bt) const; +#ifdef CMake_ENABLE_DEBUGGER + void SetDebuggerAdapter( + std::shared_ptr<cmDebugger::cmDebuggerAdapter> const& debuggerAdapter) + { + DebuggerAdapter = debuggerAdapter; + } +#endif private: bool IsMessageTypeVisible(MessageType t) const; @@ -66,4 +80,7 @@ private: bool SuppressDeprecatedWarnings = false; bool DevWarningsAsErrors = false; bool DeprecatedWarningsAsErrors = false; +#ifdef CMake_ENABLE_DEBUGGER + std::shared_ptr<cmDebugger::cmDebuggerAdapter> DebuggerAdapter; +#endif }; |