public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Sami Wagiaalla <swagiaal@redhat.com>
Cc: frysk <frysk@sourceware.org>
Subject: Re: Dwarf expertise needed
Date: Wed, 18 Jul 2007 22:43:00 -0000	[thread overview]
Message-ID: <20070718224349.165984D05CF@magilla.localdomain> (raw)
In-Reply-To: Sami Wagiaalla's message of  Wednesday, 18 July 2007 11:38:09 -0400 <469E33E1.7080909@redhat.com>

> First of all thank you for the thorough reply. I now see issues that I 
> have not seen before.

I think I'll have that on my tombstone. ;-)

> If it turns out that frame_base is the only instance then how about a 
> function get_framebase that is smart enough to figure out where the 
> correct frame base is. That way you help the client not make that 
> mistake. Or get_* for each attribute that needs the abstract instance of 
> the function.

For attributes in general it's easy, you just use dwarf_attr_integrate.
For elided children I don't have a handy helper yet, but it is
straightforward to follow the abstract_origin reference and go from there.

The frame_base case is on the other side of exactly the distinction I
pointed out.  It has nothing to do with the abstract instance, and only to
do with the physical parent of the particular concrete instance.  Figuring
it out requires a tree walk to find the parent.  

It makes sense to fetch that as part of the same operation as something
like getscopes primarily because that same tree walk is already being done.
I've imagined there might in future be some libdw optimizations that would
preserve some back-pointers to make it efficient to go up the tree, though
I certainly haven't figured out all the details of that.  So it might make
sense to use a separate call for this with the expectation that its
expensive repeat of the tree walk will be optimized in the future, but I'm
not quite sure.  I'd still like to contemplate the potential related cases
a bit more.

> That will do, although I think there might be a bug there :(. Let me 
> double check.

There is certainly a bug hit by Stan's test case, since it gets an error.


Thanks,
Roland

  reply	other threads:[~2007-07-18 22:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-19 15:22 Sami Wagiaalla
2007-06-19 15:46 ` Sami Wagiaalla
2007-06-19 18:28   ` Sami Wagiaalla
2007-06-19 21:11     ` Sami Wagiaalla
2007-06-19 21:27       ` Roland McGrath
2007-06-19 21:31         ` Sami Wagiaalla
2007-06-19 21:31           ` Roland McGrath
2007-07-17 17:07             ` Sami Wagiaalla
2007-07-18  9:03               ` Roland McGrath
2007-07-18 15:38                 ` Sami Wagiaalla
2007-07-18 22:43                   ` Roland McGrath [this message]
2007-07-19 15:31                     ` Sami Wagiaalla
2007-07-21  0:29                       ` Roland McGrath
2007-07-26 15:42                         ` Sami Wagiaalla
2007-08-07  9:04                           ` Roland McGrath
2007-08-09 17:06                             ` Sami Wagiaalla
2007-07-19 15:40                 ` Sami Wagiaalla
2007-06-19 21:38           ` Sami Wagiaalla
2007-06-19 21:58         ` Sami Wagiaalla

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=20070718224349.165984D05CF@magilla.localdomain \
    --to=roland@redhat.com \
    --cc=frysk@sourceware.org \
    --cc=swagiaal@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).