This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
PATCH: Update NEWS/texinfo with compressed debug sections info
- From: csilvers at google dot com (Craig Silverstein)
- To: gdb-patches at sourceware dot org
- Date: Fri, 18 Apr 2008 22:56:50 -0700 (PDT)
- Subject: PATCH: Update NEWS/texinfo with compressed debug sections info
I took a stab (no pun intended) at documenting the
compressed-debug-section patch, which I submitted earlier this
evening. I'm not really sure what information is appropriate to
include, or where to put it; any suggestions on this patch are
appreciated.
craig
--cut here--
* NEWS (Changes since GDB 6.8): Add information on compressed
debug sections.
* doc/gdb.texinfo (Requirements): Add an optional requirement
on zlib.
* doc/gdbint.texinfo (Debugging File Formats): Add new
subsection for Compressed DWARF 2.
Index: NEWS
===================================================================
RCS file: /cvs/src/src/gdb/NEWS,v
retrieving revision 1.264
diff -u -r1.264 NEWS
--- NEWS 4 Apr 2008 15:51:15 -0000 1.264
+++ NEWS 19 Apr 2008 05:50:35 -0000
@@ -3,11 +3,14 @@
*** Changes since GDB 6.8
+* gdb can now read compressed debug sections, as produced by GNU gold
+with the --compress-debug-sections=zlib flag.
+
* Watchpoints can now be set on unreadable memory locations, e.g. addresses
which will be allocated using malloc later in program execution.
* The qXfer:libraries:read remote procotol packet now allows passing a
- list of section offsets.
+list of section offsets.
* New features in the GDB remote stub, gdbserver
Index: doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.481
diff -u -r1.481 gdb.texinfo
--- doc/gdb.texinfo 16 Apr 2008 13:14:18 -0000 1.481
+++ doc/gdb.texinfo 19 Apr 2008 05:50:38 -0000
@@ -22732,6 +22732,17 @@
MS-Windows shared libraries (@pxref{Shared Libraries})
@end itemize
+@item zlib
+@value{GDBN} will use the zlib library, if available, to read
+compressed debug sections. Some linkers, such GNU gold, are capable
+of producing binaries with compressed debug sections. If @value{GDBN}
+is compiled with zlib, it will be able to read the debug information
+in such binaries.
+
+The zlib library is likely included with your operating system
+distribution; if it is not, you can get the latest version from
+@url{http://zlib.net}.
+
@end table
@node Running Configure
Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.280
diff -u -r1.280 gdbint.texinfo
--- doc/gdbint.texinfo 13 Feb 2008 05:05:29 -0000 1.280
+++ doc/gdbint.texinfo 19 Apr 2008 05:50:39 -0000
@@ -2201,6 +2201,29 @@
The DWARF 2 reader is in @file{dwarf2read.c}.
+@subsection Compressed DWARF 2
+
+@cindex Compressed DWARF 2 debugging info
+Compressed DWARF 2 is not technically a separate debugging format, but
+merely DWARF 2 debug information that has been compressed. In this
+format, every object-file section holding DWARF 2 debugging
+information is compressed and prepended with a header. (The section
+is also typically renamed, so a section called @code{.debug_info} in a
+DWARF 2 binary would be called @code{.zdebug_info} in a compressed
+DWARF 2 binary.) The header is 12 bytes long:
+
+@itemize @bullet
+@item
+4 bytes: the literal string ``ZLIB''
+@item
+8 bytes: the uncompressed size of the section, in big-endian byte
+order.
+@end itemize
+
+The same reader is used for both compressed an normal DWARF 2 info.
+Section decompression is done in @code{zlib_decompress_section} in
+@file{dwarf2read.c}.
+
@subsection SOM
@cindex SOM debugging info