This is the mail archive of the
dwarf2@corp.sgi.com
mailing list for the dwarf2 project.
Re: location lists revisited
- To: todd dot allen at attglobal dot net
- Subject: Re: location lists revisited
- From: Michael Eager <eager at eagercon dot com>
- Date: Wed, 21 Mar 2001 10:17:13 -0800
- CC: dwarf2 <dwarf2 at corp dot sgi dot com>
- References: <200103211612.f2LGCMB04899@toad.ccur.com>
- Reply-To: Michael Eager <eager at eagercon dot com>
Todd -- you seem to be under the impression that I am making any
kind of proposal. I am not -- I am simply suggesting that there
are ways to use Dwarf 2 which are better than the method which you
seem determined to follow.
I don't have time (or interest) in analyzing your dump which you
suggest is how I would generate Dwarf to address the situation you
describe in detail to be able to give you a critique.
In particular, when you describe this dump as my proposal, let me
be very clear that this is not the case.
I believe that the descriptions of variable "global" which you present
are incorrect. If you do not use these flawed definitions, then your
problem will go away. If you insist that flawed descriptions are
the only ones which you will consider, then there seems to be little
to discuss on this matter.
Todd Allen wrote:
>
>
> So, how does a debugger stopped at a point outside either of those objects
> (e.g. at 0x8100), and trying to reference or modify "global" know which
> location to use? Probably, it would want to track down the defining
> declaration, but that has a location list, and that list doesn't cover the
> current pc. How does it know which of the locations is the one that's good
> for the pc at which it's stopped?
I am amazed that this is even a question.
I've not seen a debugger which tries to reference variables which are
out of scope. Or, at least, not one where this is not considered a bug.
> In this example, it probably could make a good guess that it doesn't want the
> register. But that's just a heuristic and I wouldn't want to have to depend
> on it.
Dwarf describes scoped languages. Determining the actual variable
being referenced in any context is dependent on the scope of the context.
No heuristics are needed to determine the context of the reference
and there is no ambiguity in resolving the reference.
May I suggest that you look at the Dwarf 2 generated by GCC for
your program?
--
Michael Eager Eager Consulting eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077