This is the mail archive of the dwarf2@corp.sgi.com mailing list for the dwarf2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PROPOSAL re CIE version number (new) [correction 2]


A couple questions about the original 000330.1 proposal:

1)  Are there any changes in the exiting operations and format?

2)  Are the new operations optional, that is, do current files conform to 
    the 000330.1, or does the proposal require a change?

If the answer to (1) is no, and (2) is yes, then we should not have changed
the version number.  I'm not sure how we can show that there is a minor 
change in the version, but I'm also not sure that there is any need to.

Ron 603-884-2088 wrote:
> 
> [[My apologies -- in the original proposal, I meant to propose alternative
> 3 as the fall-back proposal. Worse, the previous mail marked "[correction]"
> is unchanged from the original proposal. Arghhh! It is Friday, folks, and it
> appears that my fingers are moving faster than my brain... Again, I apologise.]]
> 
> PROPOSAL re CIE version number. [The real, final one this time...]
> 
> CONTEXT
> -------
> 
> The CIE version number was "officially" changed to 2 as a result
> of accepting 000330.1.
> 
> PROPOSAL
> --------
> 
> Adopt alternative 1 below (change back to 1).
> 
> If that fails, adopt alternative 3 below (allow use of 1 under appropriate
> circumstances).
> 
> DISCUSSION
> ----------
> 
> >I believe it is necessary to change the version number since there is no way
> >for existing DWARF readers to skip the new CIE instructions.
> 
> Actually, even if there were a way to skip an unexpected instruction, it is
> not clear that a valid operation, such as a traceback, would result from
> simply leaving out the unknown step!
> 
> But how is this different than if in CIE version 1 a DWARF consumer encounters
> a CIE vendor extension (one of the codes 0x1c-0x3f, see Fig 37/page 79)
> that is from an "unknown" or "unsupported" vendor? In this case, the
> DWARF debugger also has no way to skip the "foreign" instruction -- it
> must abandon whatever operation is attempting to use the CIE information,
> hopefully gracefully (for example, abort traceback, give error message to user,
> etc).
> 
> If we bump the version number to 2, then a Dwarf V2.0 debugger is put in
> a position where it *must* refuse to use any of the CIE information from
> a Dwarf V2.1 producer, even if none of the new codes actually occur. While
> "safe", that seems more contrary to our upward compatibility goals than
> necessary. And this applies EVEN on machines other than the PowerPC!
> 
> >If somebody would like to generate CIE information with the old version
> >number we have two options:
> >
> >1. Refer to the old document
> >2. Describe what they should not use.
> 
> Alternative 1
> -------------
> 
> I still suggest that restoring the version to 1 is appropriate.
> 
> Alternative 2
> -------------
> 
> Option 2) is not all that hard to specify at least. For example, I might use
> this text in 7.23:
> 
>     "The value of the CIE version number is 1, provided that no instruction
>     whose code is in the range 0x0f-0x1b, inclusive, is used by that CIE
>     or any FDE that refers to it; otherwise, the version number is 2."
> 
> This does put a bit more burden on a Dwarf V2.1 producer to either "look
> ahead" to see if it is going to need one of the new codes before it generates
> a CIE or to otherwise notice ahead of time that the need exists. (For example,
> when generating code for the stack alignment in the PowerPC example, a flag
> might be set in the routine "node" to indicate that one of the "extended" CIE
> operations will be needed for DWARF purposes.)
> 
> Alternative 3
> -------------
> 
> A weaker rule would allow, but not require, a Dwarf V2.1 producer to use
> version 1 when appropriate. This rule might be stated using:
> 
>     "The value of the CIE version number may be 1, provided that no instruction
>     whose code is in the range 0x0f-0x1b, inclusive, is used by that CIE
>     or any FDE that refers to it; otherwise, the version number is 2.
> 
>     "<i>DWARF producers are encouraged to use a CIE version number of 1
>     whenever feasible to facilitate use of newer DWARF V2.1 descriptions
>     by existing DWARF V2.0 consumers.</i>"
> 
> ================== RFC 822 Headers ==================
> Date: Fri, 21 Apr 2000 10:56:01 -0400
> Message-Id: <00042110560126@gemevn.zko.dec.com>
> From: brender@gemevn.zko.dec.com (Ron 603-884-2088)
> To: DWARF2@postofc.corp.sgi.com, BRENDER@gemevn.zko.dec.com
> Subject: PROPOSAL re CIE version number (new)
> X-VMS-To: DWARF2-WG
> X-VMS-Cc: BRENDER


-- 
Michael Eager	 Eager Consulting     eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]