From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9632 invoked by alias); 19 Apr 2008 05:57:27 -0000 Received: (qmail 9621 invoked by uid 22791); 19 Apr 2008 05:57:26 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 19 Apr 2008 05:57:00 +0000 Received: from zps77.corp.google.com (zps77.corp.google.com [172.25.146.77]) by smtp-out.google.com with ESMTP id m3J5uqfr024806 for ; Sat, 19 Apr 2008 06:56:52 +0100 Received: from localhost (meta.corp.google.com [172.22.108.53]) by zps77.corp.google.com with ESMTP id m3J5uoRn000757; Fri, 18 Apr 2008 22:56:50 -0700 Received: by localhost (Postfix, from userid 500) id 3842A3F24C4; Fri, 18 Apr 2008 22:56:50 -0700 (PDT) To: gdb-patches@sourceware.org Subject: PATCH: Update NEWS/texinfo with compressed debug sections info Message-Id: <20080419055650.3842A3F24C4@localhost> Date: Sat, 19 Apr 2008 08:04:00 -0000 From: csilvers@google.com (Craig Silverstein) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00404.txt.bz2 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