From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6626 invoked by alias); 8 Jun 2010 20:38:29 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 6615 invoked by uid 22791); 8 Jun 2010 20:38:28 -0000 X-SWARE-Spam-Status: No, hits=-5.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SARE_RMML_Stock10,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org From: Tom Tromey To: Project Archer Subject: Fedora 14 debug proposal CC: Jakub Jelinek Reply-To: tromey@redhat.com Date: Tue, 08 Jun 2010 20:38:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2010-q2/txt/msg00032.txt.bz2 Hi all. This week I want to file a Fedora 14 feature proposal touching on debuginfo. I thought we could discuss it here first. The proposal has 2 or maybe 3 parts. 1. Generate index files for the separate .debug files. This involves running gdb to dump the index, something like: cd $dir gdb --batch-silent -ex 'maintenance save-gnu-index .' whatever.debug The generated index files are architecture-neutral, if it matters. The point of this change is that it makes gdb startup much, much faster. The indices can be mapped directly and make both by-name and by-address lookups very fast. I think this should help things like ABRT, plus of course anybody who wants to debug into any library we ship. I don't know where the debuginfo stripping is done right now, but that seems like the best place to run this script. These gdb changes aren't upstream yet. I wanted to get Fedora buy-in before dealing with that. 2. Change GCC so that it no longer emits .debug_aranges, .debug_pubnames, and .debug_pubtypes. From what I can tell, no program uses these sections. They just waste space. Well... Fedora gdb does use .debug_aranges, but that use is replaced by the index. .debug_aranges is a reasonable-enough section; it is just that we really also need by-name indices to get good performance, and having the whole index be mmap()able gives better startup performance. I think .debug_pub* are pretty useless. GCC didn't even generate pubtypes for years, and it had a lot of pubnames bugs... maybe it still does. What this means is that we can't really make gdb rely on them. Also, based on earlier experiments, reading these sections is actually still too slow. The index is better. I can write the gcc patch for this. 3. If we are shipping GCC 4.5 in F14, I think we should enable the .debug_types stuff by default. This will shrink debuginfo and it makes gdb use less memory. This one is optional, in particular I assume it will be subsumed by the other DWARF compression work. Tom