Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <ghost@cs.msu.su>
To: gdb@sources.redhat.com
Subject: Re: Variable values before initialisaton
Date: Fri, 24 Nov 2006 06:53:00 -0000	[thread overview]
Message-ID: <ek64sd$ug$1@sea.gmane.org> (raw)
In-Reply-To: <20061123195521.GA18110@nevyn.them.org>

Daniel Jacobowitz wrote:

> On Thu, Nov 23, 2006 at 05:32:39PM +0000, Rob Quill wrote:
>> How could I go about looking into a fix? I wouldn't really know where
>> to start, but it is quite annoying for what  am trying to do.
> 
> You have to emit proper debug info from the compiler.  It's the only
> thing that knows.  However, for things where initialization is
> complicated (like classes), there's basically no way to get it right.

Can you clarify? Certainly, each constructor invocation produces a finite
number of processor instruction. You can identify the "last" instruction of
those, and hack gcc to produce file last_instructions_of_ctors.txt and make
gdb read such file and do the right thing.

Now getting this work in nice way can be a lot of work, but where does "no
way to get it right" comes from? The only serious complexity I can imagine
is that if body of ctor is duplicated along two execution paths. I doubt
this happens regularly, at least at -O0.

- Volodya





  parent reply	other threads:[~2006-11-24  6:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-23 17:12 Rob Quill
2006-11-23 17:27 ` Vladimir Prus
     [not found]   ` <baf6008d0611230932o355f2ba6h9f6b0e778c82bce@mail.gmail.com>
2006-11-23 17:32     ` Rob Quill
2006-11-23 19:55       ` Daniel Jacobowitz
2006-11-23 19:58         ` Rob Quill
2006-11-24  6:53         ` Vladimir Prus [this message]
2006-11-24 15:15           ` Daniel Jacobowitz
2006-11-27 20:09             ` Jim Blandy
2006-11-28 11:21               ` Rob Quill
2006-11-28 19:29                 ` Jim Blandy

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='ek64sd$ug$1@sea.gmane.org' \
    --to=ghost@cs.msu.su \
    --cc=gdb@sources.redhat.com \
    /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