This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: two constructor copies in object file
- From: Bernard Dautrevaux <Dautrevaux at microprocess dot com>
- To: 'Alexandre Oliva' <oliva at lsd dot ic dot unicamp dot br>, "Rogelio M. Serrano Jr." <rogelio at evoserve dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 17 Jan 2002 19:02:12 +0100
- Subject: RE: two constructor copies in object file
> -----Original Message-----
> From: Alexandre Oliva [mailto:oliva@lsd.ic.unicamp.br]
> Sent: Thursday, January 17, 2002 4:26 PM
> To: Rogelio M. Serrano Jr.
> Cc: gcc@gcc.gnu.org
> Subject: Re: two constructor copies in object file
>
>
> On Jan 16, 2002, "Rogelio M. Serrano Jr."
> <rogelio@evoserve.com> wrote:
>
> > Why are the constructors created twice?
>
> One to handle full-object construction, one to handle sub-object
> construction, IIRC.
Does that mean that nm --demangle has "hidden" a difference in the two
names? It displayed exactly identical symbols (see the OP), but the mangled
ones *may* be different in some way that is *not* displayed by the
demangler.
If that's true, it would be nice if the demangler functions could display a
hint that one is a special constructor.
OTOH if you're true, that mean that we may have surprises when debugging: if
I set a breakpoint on the default constructor for some class, GDB should in
fact set one breakpoint for both constructors or at least *propose* to
choos. However allowing to set the breakpoint on either
"boot_obj::boot_obj()" or "boot_obj::boot_obj()" or "both" will probably
generate quite a lot of traffic on some ML :-)
Bernard
--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel: +33 (0) 1 47 68 80 80
Fax: +33 (0) 1 47 88 97 85
e-mail: dautrevaux@microprocess.com
b.dautrevaux@usa.net
--------------------------------------------