C++ Logo


Advanced search

Re: [isocpp-lib-ext] Debugging support and freestanding (P2546)

From: Daniel Krügler <daniel.kruegler_at_[hidden]>
Date: Mon, 13 Feb 2023 06:49:04 +0100
Am Mo., 13. Feb. 2023 um 06:11 Uhr schrieb René Ferdinand Rivera
Morell via Lib-Ext <lib-ext_at_[hidden]>:
> On Sun, Feb 12, 2023 at 4:56 PM René Ferdinand Rivera Morell
> <grafikrobot_at_[hidden]> wrote:
> >
> > On Sun, Feb 12, 2023 at 3:04 PM Ben Craig <ben.craig_at_[hidden]> wrote:
> > >
> > > If you want is_debugger_present to be a portable spelling that enables the user to implement it, then I think what you want is a replaceable function, like operator new / delete. I think I could support the idea of always having an is_debugger_present entry with an always false response, but allow the user to replace that implementation with a good one. This could allow portable spelling for libraries, portable implementations for freestanding toolchain vendors, and portably plugging in to the facility by users.
> >
> > That is a really good idea. I like it! It could easily be done as a
> > followup paper also. Since it's just adding to the
> > [replacement.functions]. Not sure when the e-polls are getting done.
> > But I can write up that additional paper, and maybe you can co-author?
> Here's a rough draft of that idea
> <https://isocpp.org/files/papers/D2810R0.html>.

But we have a suggested relation between is_debugger_present and other
debugging functions. Should from this replaceable idea follow that
e.g. breakpoint() should also be replaceable?

- Daniel

Received on 2023-02-13 05:49:16