This is the mail archive of the
dwarf2@corp.sgi.com
mailing list for the dwarf2 project.
Re: Modifies vs. Replaces
- To: todd dot allen at ccur dot com, DWARF2 at corp dot sgi dot com, BRENDER at gemevn dot zko dot dec dot com
- Subject: Re: Modifies vs. Replaces
- From: brender at gemevn dot zko dot dec dot com (Ron 603-884-2088)
- Date: Fri, 23 Mar 2001 16:59:40 -0500
- Reply-To: brender at gemevn dot zko dot dec dot com (Ron 603-884-2088)
Todd Allen, quoting Michael Eager, wrote:
>> To make my point succinctly, describing such a location description
>> as modifying the location description on a defining declaration
>> permits a debugger to decide how this modification is to be done.
>>
>> My opinion is that in most (perhaps all) cases, augmenting the
>> location information of the defining declaration would be the
>> appropriate action for a debugger to take. Todd, on the other hand,
>> would decide that the appropriate modification is to replace the
>> defining declaration's location information with the non-defining
>> location.
>>
>> In either case, this represents a modification to the location
>> information as described in the proposal. As far as I can tell,
>> the proposal, as written, permits a debugger to act both as I
>> would feel is correct and as Todd would have it act.
>>
>> Todd has suggested that the non-defining location information
>> must replace the location information of the defining declaration.
>> This would eliminate the interpretation that the two sets of
>> information were to be merged and require me to make the same
>> design decisions in my debugger that he wishes to make in his.
>>
>> Modifies permits a range of reasonable interpretations, which
>> include replacement. The converse is not true.
>>
>
>I think it is unwise to leave the interpretation of this to the debugger. As
>you like to point out, DWARF2 is intended to describe the structure of the
>program. Leaving this ambiguous in the standard leaves the definition of the
>structure ambiguous. If a compiler and debugger resolve the ambiguity in
>different ways, they won't interoperate well. I should think one of the
>goals of the standard would be to define the description clearly enough that
>compilers and debuggers can interoperate well.
The discussion over "modifies" vs "replaces" has been very hard to
follow -- both terms, and especially "modifies", are pretty generic in
common English usage. Quite honestly, when I first read the original
proposal of 22 March, I thought that "modifies" was in fact intended to
mean what Todd later came to call "replaces" -- but especially, it never
occurred to me that it was intentionally ambiguous!
Please, folks -- it is hard enough to be unambiguous even when we try,
lets not deliberately slip in a little intentional ambiguity without
warning! At the very least, if we want to allow alternative interpretations
then we need to say this clearly; maybe even present two or three to
illustrate the differences. There are places where we accept it as a
fact of life (for example, what character set is used for names in
the absence of DW_AT_use_UTF8?), but at least we are clear that the
"meaning" is undefined by DWARF and subject to implementer choice.
Moreover, I have yet to hear any argument that such ambiguity is actually
goodness in this case. It is actually becoming reasonably possible to
have a choice of several debuggers (system vendor's, gdb, TotalView, ?)
to use on the same executable -- why would we want to allow a variety of
interpretations among debuggers for the same DWARF? I can't think of
any plausible reason...
[Separately, I will try to address the choice of interpretation.]