This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA/stabs reader] Fix v3 duplicate constructors problem
- From: Joe Buck <jbuck at synopsys dot COM>
- To: jimb at zwingli dot cygnus dot com (Jim Blandy)
- Cc: jason at redhat dot com (Jason Merrill),msnyder at cygnus dot com (Michael Snyder), gdb-patches at sources dot redhat dot com,gcc at gcc dot gnu dot org
- Date: Tue, 4 Dec 2001 09:42:12 -0800 (PST)
- Subject: Re: [RFA/stabs reader] Fix v3 duplicate constructors problem
>
>
> Jason Merrill <jason@redhat.com> writes:
> > Constructors and destructors have traditionally had a special calling
> > convention. Though I suppose that as of v3, we've gone to clones rather
> > than extra hidden parameters, so it would be more feasible to allow users
> > to call them directly from the debugger. In any case, it needs some sort
> > of special handling.
>
> Wouldn't it be reasonable for GDB to support `new' expressions?
Yes, if the gdb user can call placement new, s/he can call a constructor
and place an object whereever desired. Something like
(gdb) call new(ptr) SomeClass(1, "Hello")