On Friday, 11 April 2025, Jonathan Wakely wrote:
> On Fri, 11 Apr 2025 at 08:00, Tomasz Kaminski wrote:
>>
>>
>>
>> On Thu, Apr 10, 2025 at 6:53 PM Jonathan Wakely
wrote:
>>>
>>> It would be good to provide a macOS definition of is_debugger_present as
>>> per https://developer.apple.com/library/
On Mon, Jun 3, 2024 at 9:06 AM Peter0x44 wrote:
>
> 3 Jun 2024 4:14:28 pm Jonathan Wakely :
>
> > On Mon, 3 Jun 2024 at 14:36, Peter0x44 wrote:
> >>> +void
> >>> +std::breakpoint() noexcept
> >>> +{
> >>> +#if _GLIBCXX_HAVE_DEBUGAPI_H && defined(_WIN32) &&
> >>> !defined(__CYGWIN__)
> >>> + Debug
3 Jun 2024 4:14:28 pm Jonathan Wakely :
On Mon, 3 Jun 2024 at 14:36, Peter0x44 wrote:
+void
+std::breakpoint() noexcept
+{
+#if _GLIBCXX_HAVE_DEBUGAPI_H && defined(_WIN32) &&
!defined(__CYGWIN__)
+ DebugBreak();
+#elif __has_builtin(__builtin_debugtrap)
+ __builtin_debugtrap(); // Clang
+#eli
On Mon, 3 Jun 2024 at 14:36, Peter0x44 wrote:
> > +void
> > +std::breakpoint() noexcept
> > +{
> > +#if _GLIBCXX_HAVE_DEBUGAPI_H && defined(_WIN32) &&
> > !defined(__CYGWIN__)
> > + DebugBreak();
> > +#elif __has_builtin(__builtin_debugtrap)
> > + __builtin_debugtrap(); // Clang
> > +#elif define
On 2024-06-01 03:22, Jonathan Wakely wrote:
Here's an implementation of the C++26 header.
We should really have some tests that invoke GDB and check that the
breakpoint works when a debugger is attached. That seems tricky to do
via the main conformance.exp testsuite. It could be done via the
pr
On Mon, Jun 3, 2024 at 12:20 PM Florian Weimer wrote:
> Would it make sense to have a special function symbol for this, on which
> the debugger sets the breakpoint? […]
Jon and I discussed more details off-list. Hopefully a more complete
version is coming soon-ish.
* Jonathan Wakely:
> +/** Stop the program with a breakpoint or debug trap.
> + *
> + * The details of how a breakpoint is implemented are platform-specific.
> + * Some systems provide a special instruction, such as `int3` in x86.
> + * When no more appropriate mechanism is available, this will st
Hey Jon,
I think we should give debuggers a chance to announce themselves by
providing an entry point they can call (in the inferior) which sets a
flag. A set flag plus a tracer PID would then be a sufficient
indicator. The remaining code should also stay but some additional
code can be added:
Here's an implementation of the C++26 header.
We should really have some tests that invoke GDB and check that the
breakpoint works when a debugger is attached. That seems tricky to do
via the main conformance.exp testsuite. It could be done via the
prettyprinters.exp testsuite, which already uses