home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 7
/
FreshFishVol7.bin
/
bbs
/
gnu
/
gcc-2.3.3-src.lha
/
GNU
/
src
/
amiga
/
gcc-2.3.3
/
README.DWARF
< prev
next >
Wrap
Text File
|
1994-02-06
|
30KB
|
595 lines
Notes on the GNU Implementation of DWARF Debugging Information
--------------------------------------------------------------
Last Updated: Sun Oct 4 10:04:13 PDT 1992 by rfg@netcom.com
-----------------------------------------------------
This file describes special and unique aspects of the GNU implementation
of the DWARF debugging information language, as provided in the GNU version
2.x compiler(s).
For general information about the DWARF debugging information language,
you should obtain the DWARF version 1 specification document (and perhaps
also the DWARF version 2 draft specification document) developed by the
UNIX International Programming Languages Special Interest Group. A copy
of the the DWARF version 1 specification (in PostScript form) may be
obtained either from me <rfg@netcom.com> or from UNIX International. (See
below.) The file you are looking at now only describes known deviations
from the UI/PLSIG DWARF version 1 specification, together with those
things which are allowed by the DWARF version 1 specification but which
are known to cause interoperability problems (e.g. with SVR4 SDB).
To obtain a copy of the DWARF version 1 specification from UNIX International,
use the following procedure:
---------------------------------------------------------------------------
Send mail to archive@ui.org containing the following:
path yourname@your.site
send PUBLIC/dwarf.v1.mm
for the troff source, or
send PUBLIC/dwarf.v1.ps
for the postscript. If you system supports uncompress and uudecode,
you can request that the data be compressed by placing the command
'compress' in the message.
If you have any questions about the archive service, please contact
Shane P. McCarron, UI Project Manager, <s.mccarron@ui.org>.
---------------------------------------------------------------------------
The generation of DWARF debugging information by the GNU version 2.x C
compiler has now been tested rather extensively for m88k, i386, i860, and
Sparc targets. The DWARF output of the GNU C compiler appears to inter-
operate well with the standard SVR4 SDB debugger on these kinds of target
systems (but of course, there are no guarantees).
DWARF generation for the GNU g++ compiler is still not operable. This is
due primarily to the many remaining cases where the g++ front end does not
conform to the conventions used in the GNU C front end for representing
various kinds of declarations in the TREE data structure. It is not clear
at this time how these problems will be addressed.
Future plans for the dwarfout.c module of the GNU compiler(s) includes the
addition of full support for GNU FORTRAN. (This should, in theory, be a
lot simpler to add than adding support for g++... but we'll see.)
Many features from the evolving DWARF version 2 (draft) specification have
been adapted to, and used in the GNU implementation of DWARF (version 1).
In most of these cases, a DWARF version 2 (draft) approach is used in place
of (or in addition to) DWARF version 1 stuff simply because it is apparent
that DWARF version 1 is not sufficiently expressive to provide the kinds of
information which may be necessary to support really robust debugging.
In *all* of these cases however, the use of DWARF version 2 (draft) features
should not interfere in any way with the interoperability (of GNU compilers)
with generally available "classic" (pre version 1) DWARF consumer tools
(e.g. SVR4 SDB). Full support for DWARF version 2 should be available
sometime after the DWARF version 2 specification has been finalized.
The DWARF generation enhancement for the GNU compiler(s) was initially
donated to the Free Software Foundation by Network Computing Devices.
(Thanks NCD!) Additional development and maintenance of dwarfout.c has
been largely supported (i.e. funded) by Intel Corporation. (Thanks Intel!)
If you have questions or comments about the DWARF generation feature, please
send mail to me <rfg@netcom.com>. I will be happy to investigate any bugs
reported and I may even provide fixes (but of course, I can make no promises).
The DWARF debugging information produced by GCC may deviate in a few minor
(but perhaps significant) respects from the DWARF debugging information
currently produced by other C compilers. A serious attempt has been made
however to conform to the published specifications, to existing practice,
and to generally accepted norms in the GNU implementation of DWARF.
If you are interested in obtaining more information about DWARF or in
participating in the continuing evolution of DWARF within the UI/PLSIG
group, please contact either myself or the UI/PLSIG chairman, Dan Oldman
<oldman@dg-rtp.dg.com>. The UI/PLSIG welcomes and encourages the
participation of new members who might be interested in discussing debugging
issues in general, and DWARF in particular. There are no dues and you
DO NOT have to be a UI member in order to join the UI/PLSIG. The UI/PLSIG
operates an E-mail mailing list and holds regular meeting in various cities.
If you don't have time to participate actively, but would like to be kept
abreast of recent developments, you con join the UI/PLSIG mailing list and
just listen in on our lively discussions.
** IMPORTANT NOTE ** ** IMPORTANT NOTE ** ** IMPORTANT NOTE **
Under normal circumstances, the DWARF information generated by the GNU
compilers (in an assembly language file) is essentially impossible for
a human being to read. This fact can make it very difficult to debug
certain DWARF-related problems. In order to overcome this difficulty,
a feature has been added to dwarfout.c (enabled by the -fverbose-asm
option) which causes additional comments to be placed into the assembly
language output file, out to the right-hand side of most bits of DWARF
material. The comments indicate (far more clearly that the obscure
DWARF hex codes do) what is actually being encoded in DWARF. Thus, the
-fverbose-asm option can be highly useful for those who must study the
DWARF output from the GNU compilers in detail.
---------
(Footnote: Within this file, the term `Debugging Information Entry' will
be abbreviated as `DIE'.)
Release Notes (aka known bugs)
-------------------------------
In one very obscure case involving dynamically sized arrays, the DWARF
"location information" for such an array may make it appear that the
array has been totally optimized out of existence, when in fact it
*must* actually exist. (This only happens when you are using *both* -g
*and* -O.) This is due to aggressive dead store elimination in the
compiler, and to the fact that the DECL_RTL expressions associated with
variables are not always updated to correctly reflect the effects of
GCC's aggressive dead store elimination.
-------------------------------
When attempting to set a breakpoint at the "start" of a function compiled
with -g1, the debugger currently has no way of knowing exactly where the
end of the prologue code for the function is. Thus, for most targets,
all the debugger can do is to set the breakpoint at the AT_low_pc address
for the function. But if you stop there and then try to look at one or
more of the formal parameter values, they may not have been "homed" yet,
so you may get inaccurate answers (or perhaps even addressing errors).
Some people may consider this simply a non-feature, but I consider it a
bug, and I hope to provide some some GNU-specific attributes (on function
DIEs) which will specify the address of the end of the prologue and the
address of the beginning of the epilogue in a future release.
-------------------------------
It is believed at this time that old bugs relating to the AT_bit_offset
values for bit-fields have been fixed.
There may still be some very obscure bugs relating to the DWARF description
of type `long long' bit-fields for target machines (e.g. 80x86 machines)
where the alignment of type `long long' data objects is different from
(and less than) the size of a type `long long' data object.
Please report any problems with the DWARF description of bit-fields as you
would any other GCC bug. (Procedures for bug reporting are given in the
GNU C compiler manual.)
-----------