[libcxx-commits] [libcxx] WIP - [libc++][debugging] P2546R5: Debugging support & P2810R4: `is_debugger_present` `is_replaceable` (PR #81447)
Hristo Hristov via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Apr 29 03:42:43 PDT 2024
H-G-Hristov wrote:
@vogelsgesang
Thank you for starting a discussion. You made some interesting and useful points/info.
> and would then do the actual work inside lldb / gdb / _your favorite debugger_.
If I understand you correctly and to my knowledge about what Standard library function should be this is not how it should be implemented. The purpose of a Standard library features is not to provide the "best performing" solution in a specific context but one that is generic and usable in generic context. I don't believe that any feature of the library should depend on a third-party tool to function. P2546R5 references several reference implementations and I think that's what it is proposing. Such implementation will work on any support platform.
I think your solution is more like a debugger specific extension and not fit for a Standard library.
> In lldb / gdb, this would require some special handling of those debugging functions. But for a good user experience, dedicated lldb support might be necessary, anyway, as previously noted in:
>
>> debugger support: when the debugger breaks in breakpoint() it breaks inside the implementaiton, which isn't an optimal user experience. Perhaps LLDB (the debugger) can be thought to break on breakpoint() call site, similar to the /JMC option in MSVC but this is unrelated work to this patch.
This idea is just to enhance the user experience and is not required for the `<debugingr>` functions to work.
This is how I understand it. I may be completely wrong but the purpose of the PR is also to collect opinions and suggestions..
https://github.com/llvm/llvm-project/pull/81447
More information about the libcxx-commits
mailing list