public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Devang Patel <dpatel@apple.com>
Cc: GCC Development <gcc@gcc.gnu.org>
Subject: Re: Reducing debug info for C++ ctors/dtors
Date: Tue, 12 Jul 2005 00:56:00 -0000	[thread overview]
Message-ID: <20050712005636.GA21559@nevyn.them.org> (raw)
In-Reply-To: <CCB5AA6D-58F6-4969-A811-152947C10D63@apple.com>

On Mon, Jul 11, 2005 at 05:37:32PM -0700, Devang Patel wrote:
> will emit a class definition LSYM of
> 
>         .stabs  "Base1:Tt(0,41)=s4x:(0,9),0,32;__base_ctor ::(0,42)=# 
> (0,41),(0,36),(0,43)=*(0,41),(0,9),(0,36);:_ZN5Base1C2Ei; 
> 2A.;__comp_ctor ::(0,42):_ZN5Base1C1Ei;2A.;getx::(0,44)=#(0,41),(0,9), 
> (0,43),(0,36);:_ZN5Base14getxEv;2A.;;",128,0,1,0
> 
> 
> However, it is good enough to have
> 
>         .stabs "Base1:Tt(0,41)=s4x:(0,9),0,32;getx::(0,44)=#(0,41), 
> (0,9),(0,43)=*(0,41),(0,36);:_ZN5Base14getxEv;2A.;;",128,0,1,0
> 
> and keep the stabs for the cdtors in other contexts, most obviously  
> the FUN stab where the function is defined.  e.g.

Eh, no.  You have just lost any information about what constructors
were declared in the class.  Reconstructing this from what constructors
we can find a definition of will be messy and error-prone, because the
debugger will not be able to link a member function back to a
particular member in the definition of the class type.

Dwarf handles clones very differently from stabs.  The abstract
definition goes in the class type and the clones only have concrete
instances.  That is probably what you want for stabs: have one of the
base/complete ctors, but not both.

The effect on dwarf output might be more interesting.

GDB just ignores all but one of each set in stabs anyway.


-- 
Daniel Jacobowitz
CodeSourcery, LLC

  reply	other threads:[~2005-07-12  0:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-12  0:37 Devang Patel
2005-07-12  0:56 ` Daniel Jacobowitz [this message]
2005-07-12  1:12   ` Jason Molenda
2005-07-12  1:18     ` Daniel Jacobowitz
2005-07-12  3:46       ` Jason Molenda
2005-07-13 18:42       ` Devang Patel
2005-07-13 18:45         ` Eric Christopher
2005-07-13 19:36           ` Mike Stump
2005-07-13 19:39             ` Eric Christopher
2005-07-13 21:05               ` Mike Stump
2005-07-13 22:11                 ` Eric Christopher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050712005636.GA21559@nevyn.them.org \
    --to=drow@false.org \
    --cc=dpatel@apple.com \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).