On Fri, 11 Apr 2025 at 14:47, Jonathan Wakely <jwak...@redhat.com> wrote:
>
> This includes the P2810R4 (is_debugger_present is_replaceable) changes,
> allowing std::is_debugger_present to be replaced by the program.
>
> It would be good to provide a macOS definition of is_debugger_present as
> per https://developer.apple.com/library/archive/qa/qa1361/_index.html
> but that isn't included in this change.
>
> libstdc++-v3/ChangeLog:
>
>         * config.h.in: Regenerate.
>         * configure: Regenerate.
>         * configure.ac: Check for facilities needed by <debugging>.
>         * include/Makefile.am: Add new header.
>         * include/Makefile.in: Regenerate.
>         * include/bits/version.def (debugging): Add.
>         * include/bits/version.h: Regenerate.
>         * src/c++26/Makefile.am: Add new file.
>         * src/c++26/Makefile.in: Regenerate.
>         * include/std/debugging: New file.
>         * src/c++26/debugging.cc: New file.
>         * testsuite/19_diagnostics/debugging/breakpoint.cc: New test.
>         * testsuite/19_diagnostics/debugging/breakpoint_if_debugging.cc:
>         New test.
>         * testsuite/19_diagnostics/debugging/is_debugger_present.cc: New
>         test.
>         * testsuite/19_diagnostics/debugging/is_debugger_present-2.cc:
>         New test.
> ---
>
> This v3 patch uses #elif for the SYS_PTRACE_H group, as suggested by
> Tomasz, adds more systemtap probes, and fixes the known debuggers checks
> to match LLDB properly and to match gdbserver. Tested with gdb,
> gdbserver, and lldb on Fedora 41.

Oh, and I also added a test that replaces std::is_debugger_present()
with a program-defined function and verifies that it's called instead
of the one in libstdc++exp.a.

Reply via email to