[libcxx-commits] [libcxx] WIP - [libc++][debugging] P2546R5: Debugging support & P2810R4: `is_debugger_present` `is_replaceable` (PR #81447)
Jonathan Wakely via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jun 3 08:28:23 PDT 2024
jwakely wrote:
> I completely agree that a better user experience would be for the debugger to recognize `std::breakpoint()` and `std::breakpoint_if_debugging()` and break in the user code where those functions are called (rather than inside those functions in std::lib code). And if the debugger does that, it should then not step into the function, but skip over it (because it already put a breakpoint there, so we don't need the `__builtin_debugtrap()`, `__builtin_trap()` etc. that the function body would do). GDB support for that is being discussed.
If debuggers are going to do that, could they also recognize `is_debugger_present()` and just replace it with `true`, without needing the `bool` flag or special hooks?
https://github.com/llvm/llvm-project/pull/81447
More information about the libcxx-commits
mailing list