Commit Graph

251 Commits

Author SHA1 Message Date
Brad King 85a9fe056f Merge topic 'cxx23'
a0fabc4769 cmGlobalGeneratorFactory: Provide complete cmGlobalGenerator to deleter
85627a93c9 cmCTestBuildCommand: Avoid requiring complete cmGlobalGenerator type publicly
641c02a3ce cmList: Avoid using operator-> on input iterator
e4483b8871 Tests: Avoid compiling call to dap::optional<dap::string>(nullptr)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8950
2023-11-08 10:32:04 -05:00
Brad King e4483b8871 Tests: Avoid compiling call to dap::optional<dap::string>(nullptr) 2023-11-07 09:13:24 -05:00
Brad King 9627ef86c9 Merge topic 'debugger-function-name-in-stacktrace'
c028425df9 Debugger: report function name in DAP stackframes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8913
2023-10-27 09:04:06 -04:00
Dmitry.Neverov c028425df9 Debugger: report function name in DAP stackframes
Before a file name and a line were returned, but they can be
obtained by other means.

Fixes: #25091
2023-10-26 09:51:32 -04:00
Brad King 264dcae5e4 Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
Ben Boeckel b0612796b1 cmDebugTools: add header
This provides a utility macro which prints out:

- location of the call;
- the expression being evaluated; and
- the value of the expression.

Evaluates to the value of the expression.

Inspired by Rust's `dbg!` macro.

See: https://doc.rust-lang.org/stable/std/macro.dbg.html
2023-10-01 06:52:44 -04:00
Kyle Edwards 49a37d5a97 cmCTestScriptHandler: Replace cmsysProcess with cmUVProcessChain
And update cmSystemTools::WaitForLine() to use cmUVProcessChain.
2023-08-29 10:51:30 -04:00
Kyle Edwards 27be5ccd45 cmUVStreamRead: Return RAII handle to avoid memory leak 2023-08-25 10:44:06 -04:00
Kyle Edwards 439722993e CMakeLibTests: Compile with WIN32_LEAN_AND_MEAN 2023-08-21 14:48:07 -04:00
Brad King df0a32f48e Merge topic 'debugger-pipe-connections'
8b1257e7bf Debugger: Replace libuv with platform-specific connection code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8711
2023-08-19 08:46:01 -04:00
Paul Maybee 8b1257e7bf Debugger: Replace libuv with platform-specific connection code
Remove libuv usage from CMake debugger. Libuv has an async io model
and cppdap uses a sync model, so an extra thread and a buffer copy
were necessary to match semantics. In order to eliminate those
costs this commit implements the IO using platform specific APIs.
2023-08-17 10:11:33 -04:00
Brad King 5a7f30e532 Merge topic 'test-debugger-named-pipe-fix'
1a5cb0c1c1 testDebuggerNamedPipe: fix for cppdap with nlohmann_json

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8725
2023-08-16 13:31:57 -04:00
Đoàn Trần Công Danh 1a5cb0c1c1 testDebuggerNamedPipe: fix for cppdap with nlohmann_json
Fixes: #25190
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
2023-08-16 10:24:08 -04:00
Brad King 5ed03aa07a Merge topic 'add-cm-fileno'
fbdb1fd843 Source: Add cm_fileno wrapper

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8686
2023-08-09 11:36:07 -04:00
Kyle Edwards fbdb1fd843 Source: Add cm_fileno wrapper
And use it where appropriate.
2023-08-07 11:26:05 -04:00
Marc Chevrier a9a34edc82 cmList: Fix performance regression in append/prepend
Fixes: #25147
2023-08-04 09:55:47 +02:00
Marc Chevrier 7f9f96151a cmList: Fix performance regression in append/prepend
Fixes: #25147
2023-08-04 09:52:08 +02:00
Brad King d56b0f9339 Merge topic 'test_utf8_improve'
3ce4e9523c testUTF8: Improve using string_view

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8673
2023-08-01 09:29:09 -04:00
Vitaly Stakhovsky 3ce4e9523c testUTF8: Improve using string_view 2023-07-30 15:55:39 -04:00
Brad King 241ee252ce IWYU: Update for Debian 12 CI job
`include-what-you-use` diagnostics, in practice, are specific to
the environment's compiler and standard library.  Update includes
to satisfy IWYU for our CI job under Debian 12.
2023-07-28 09:14:08 -04:00
Kyle Edwards 830a4b37aa cmUVProcessChain::Wait(): Treat timeout of 0 as no timeout 2023-07-26 13:08:27 -04:00
Marc Chevrier 945b9b8132 cmCMakePath: workarounds for Sunpro/sparc compiler 2023-07-18 11:50:07 -04:00
Brad King c9b1ce71f6 Merge topic 'debugger-breakpoints'
60b6383993 Debugger: Always clear existing breakpoints on setBreakpoints

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8624
2023-07-14 08:34:30 -04:00
Ben McMorran 60b6383993 Debugger: Always clear existing breakpoints on setBreakpoints
Fixes: #25063
2023-07-13 08:44:52 -04:00
Brad King dab61cf1aa Merge topic 'debugger-no-supportsVariableType'
e02cf3f190 Debugger: Correctly handle clients without supportsVariableType

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Garrett Campbell <gcampbell@microsoft.com>
Merge-request: !8620
2023-07-13 08:36:25 -04:00
Ben McMorran e02cf3f190 Debugger: Correctly handle clients without supportsVariableType
Fixes: #25057
2023-07-12 10:09:21 -04:00
Brad King d2a28d185a Tests: Improve order of CMakeLibTests link libraries
Avoid repeating `libCMakeLib.a` multiple times on the link line.
2023-07-07 10:23:31 -04:00
Brad King 7417495de5 Merge topic 'debugger-segfault'
764258771a Debugger: Fix threads request segfault after thread exited event

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8604
2023-06-30 09:30:21 -04:00
Ben McMorran 764258771a Debugger: Fix threads request segfault after thread exited event
Fixes: #25041
2023-06-29 13:25:51 -04:00
Clemens Wasser 90dec6e9cc CMakeLibTests: Precompile common expensive headers 2023-06-22 18:11:45 +02:00
Kyle Edwards 0878306386 cmUVStream: Add cmUVStreamRead() function 2023-06-14 11:53:55 -04:00
Kyle Edwards b8fd273ed7 cmUVProcessChain: Return output and error streams as file descriptors 2023-06-14 11:53:55 -04:00
Kyle Edwards ec81d40be4 cmUVPipeIStream: Add cmUVPipeIStream 2023-06-14 11:53:55 -04:00
Kyle Edwards e329704546 cmUVProcessChain: Add support for SetExternalStream(Stream_INPUT) 2023-06-12 10:34:04 -04:00
Kyle Edwards 891b60d691 cmUVProcessChain: Add Status::SpawnResult field 2023-06-08 14:56:27 -04:00
Kyle Edwards 154fe00ca5 cmUVProcessChain: Add Status::GetException() method 2023-06-05 11:27:45 -04:00
Kyle Edwards 22e5775cde cmUVProcessChain: Add Finished() method 2023-05-31 17:21:52 -04:00
Glen Chung a9a592f96e 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>
2023-05-30 09:46:12 -04:00
Kyle Edwards ec80090ce3 cmUVProcessChain: Add option for merged output and error 2023-05-26 15:52:01 -04:00
Kyle Edwards 67bb1ee50c cmUVProcessChain: Add working directory option 2023-05-26 11:25:32 -04:00
Ben Boeckel e8efcbec8c iwyu: ignore std::remove_reference requirements
This removes some includes from some existing files.
2023-05-15 22:26:36 -04:00
Marc Chevrier 375e6fdbbe Link step: use linker dependency linker file
Based on work done by @ben.boeckel (!8051)

Fixes: #22217
2023-05-03 17:08:07 +02:00
Marc Chevrier 241304190f CMake code rely on cmList class for CMake lists management (part. 2) 2023-04-29 09:54:31 +02:00
Marc Chevrier 87fe031a07 cmList class: various enhancements 2023-04-29 09:54:22 +02:00
Marc Chevrier 9f60f19ee9 cmList: CMake list implementation
Fixes: #24548
2023-04-05 17:54:55 +02:00
Brad King 4901fdb201 Merge topic 'presets-json-errors'
19305afd8a presets: Improve JSON parser and error messages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8290
2023-03-30 08:51:18 -04:00
Martin Duffy 19305afd8a presets: Improve JSON parser and error messages 2023-03-29 10:41:19 -04:00
Matthew Woehlke 302f5171d8 Utilities/Sphinx: Add 'cref' role
Add a role that can be used to create local links (a la '`LINK`_'), but
that also applies literal style. This is particularly useful for
referring to subcommands within the command's documentation in a style
that is consistent with ':command:`BAR <foo(BAR)>`' but is much less
verbose.

Although this is intended for subcommands, it works with any local
reference.

Co-authored-by: Brad King <brad.king@kitware.com>
2023-03-14 15:20:47 -04:00
Brad King 8c52458a9e cmRST: Fix cmake domain directives with newline before argument
The `signature` directive added by commit 74e3c1d313 (Utilities/Sphinx:
Add a directive to document command signatures, 2023-02-24) will be
commonly used with the form:

    .. signature::
       some_command(SOME_SIGNATURE)

      Docs for this signature.

Drop the assumption that all CMake domain directives are immediately
followed by their argument on the same line.
2023-03-09 16:10:03 -05:00
Matthew Woehlke 74e3c1d313 Utilities/Sphinx: Add a directive to document command signatures
Add a `signature` directive to offer a CMake version of Sphinx's
`function` directive, similar to that found in other domains (py, cpp,
etc.).  Like others, this takes one or more signatures as arguments and
creates dt/dd nodes from the signatures and the directive contents.
2023-03-03 17:05:02 -05:00