Re: How to setup a breakpoint on constructor

Eli Zaretskii
2004-07-19T03:58:43Z

> Date: Sun, 18 Jul 2004 17:48:53 -0400
> From: Daniel Jacobowitz <drow@false.org>
>
> Is it one breakpoint with multiple addresses, or have we created multiple
> breakpoints?

The latter, I'd say. After all, that was one of the reasons for the
change in the breakpoint machinery that now supports multiple
locations for a single breakpoint, right?

> If the latter, we have to somehow distinguish the two of them in the UI
> so that the user can see which is which; and generate different
> location strings for them, so that if the user recompiles and reloads
> the breakpoints get set on the same place, in case they have different
> conditions or commands or enable status.

We should do these, true; but even if we didn't, the resulting
deficiencies would be much less painful than the current situation.
AFAIK, bugs in constructors and destructors are quite common, so
having no good means to debug them is BAD, IMHO.

> The general case of 'break <line>' has many similar issues, for
> instance in templates or inlined functions; describing the location is
> quite a problem.
>
> Not an insoluble one, surely, but I get stuck every time I work on
> it...

Maybe describing the issues here could produce some usefule discusion
about possible design solutions.