This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to setup a breakpoint on constructor


On Sun, Jul 18, 2004 at 09:42:39PM +0200, Eli Zaretskii wrote:
> > Date: Sun, 18 Jul 2004 01:04:20 -0400
> > From: Daniel Jacobowitz <drow@false.org>
> > > 
> > > Can't we put a breakpoint on all instances in that case as well?
> > 
> > Yes.  But this requires a certain amount of user interface design and
> > implementation hackery that no one has done
> 
> Sorry, I must be missing something: if we put the breakpoint on all
> the instances of the constructor's code, and do that without asking
> the user anything, what UI aspects need to be figured out and
> designed?

Is it one breakpoint with multiple addresses, or have we created multiple
breakpoints?  If the former, we have to somehow arrange to display
them.

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.

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...

-- 
Daniel Jacobowitz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]