From: Daniel Jacobowitz <drow@false.org>
To: gdb@sourceware.org
Subject: Re: Variable values before initialisaton
Date: Fri, 24 Nov 2006 15:15:00 -0000 [thread overview]
Message-ID: <20061124151537.GA12695@nevyn.them.org> (raw)
In-Reply-To: <ek64sd$ug$1@sea.gmane.org>
On Fri, Nov 24, 2006 at 09:52:52AM +0300, Vladimir Prus wrote:
> 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.
You can have:
- Initialize part A of structure
- Read part A of structure
- Initialize rest of structure
You don't want GDB to be unable to display the structure at that read,
do you? So you need to know which bits of it are initialized and which
aren't. And, in some cases, you want to be able to debug a structure
pointer after "new" returns some storage but before the constructor is
invoked.
I suppose this is doable though: a very interesting project for someone
interested in learning about debug info formats and generation would be
to annotate initializedness somehow. The compiler does know. But it
wouldn't be easy.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-11-24 15:15 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
2006-11-24 15:15 ` Daniel Jacobowitz [this message]
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=20061124151537.GA12695@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@sourceware.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