This is the mail archive of the
dwarf2@corp.sgi.com
mailing list for the dwarf2 project.
Re: 991102.1 64bit dwarf (.eh_frame)
- to: DWARF2 at corp dot sgi dot com
- Subject: Re: 991102.1 64bit dwarf (.eh_frame)
- From: James Cownie <jcownie at etnus dot com>
- Date: Tue, 04 Apr 2000 12:21:10 +0100
- Reply-To: James Cownie <jcownie at etnus dot com>
>By the way, the CIE_id value is not specified in the document.
>SGI uses all one bits. In .eh_frame GNU uses all zero bits
>(.eh_frame is not *literally* .debug_frame by name, but the
>content is the same, and the current dwarfdump prints it.)
>Would make sense to specify one or the other?
>Or allow both? Just leaving it totally unspecified is ok,
>but perhaps an italicized comment that it is explicitly unspecified
>would be good. The present situation forces the implementor
>to derive that it is unspecified and then decide a value.
The .eh_frame is a confusion which we should not be worrying
about. It's not a DWARF debugging information section at all.
It's there to provide information for the C++ exception handler at run
time, with the following consequences
1) It's mapped into store (whereas .debug_* sections normally are
not).
2) All of the "addresses" in .eh_frame are function relative.
In .debug_frame they are absolute. (Give or take DLL relocations,
of course).
The fact that the GCC folks choose to use a format _derived_ from
DWARF to pass information to their run time shouldn't concern us.
We should be specifying only what goes in our sections, and .eh_frame
is not one of ours. (Trying to put .debug_frame information into the
.eh_frame section loses very badly, it breaks g++ exception handling,
and it breaks the debugger because you can't distinguish which pieces
came from gcc and really should be interpreted as .eh_frame
information, and which came from the .debug_frame information). [Been
there, seen that ;-) ].
As has been previously pointed out, DWARF _does_ specify all 1s for
the CIE_id value.
I believe that this not a free choice, since while parsing this you
need to recognise a new CIE, so this has to be an invalid FDE value.
Anyhow, my message is (strongly) that we should ignore .eh_frame as
having nothing to do with DWARF.
-- Jim
James Cownie <jcownie@etnus.com>
Etnus, Inc. +44 117 9071438
http://www.etnus.com