From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13936 invoked by alias); 9 Nov 2012 18:23:35 -0000 Received: (qmail 13928 invoked by uid 22791); 9 Nov 2012 18:23:34 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO,TW_XZ X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 09 Nov 2012 18:23:29 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 5D1A41C65E8; Fri, 9 Nov 2012 13:23:28 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id rWNChkf4gWzN; Fri, 9 Nov 2012 13:23:28 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 2CE8D1C6469; Fri, 9 Nov 2012 13:23:28 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 152FCC7D10; Fri, 9 Nov 2012 10:23:17 -0800 (PST) Date: Fri, 09 Nov 2012 18:23:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: RFA: handle "MiniDebuginfo" section Message-ID: <20121109182316.GQ5103@adacore.com> References: <87wqxuel5k.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87wqxuel5k.fsf@fleche.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2012-11/txt/msg00254.txt.bz2 > Fedora recently approved and committed the "MiniDebuginfo" feature: > > http://fedoraproject.org/wiki/Features/MiniDebugInfo Looks pretty nice :) > This patch adds support for this feature to gdb. I think the > implementation is pretty straightforward. If you want to enable it, you > will need the LZMA library: > > http://tukaani.org/lzma/ I went to the website to see which formats it supports, and was surprised to read: Users of LZMA Utils should move to XZ Utils. X Shouldn't we just switch to xzutils instead? > 2012-11-09 Alexander Larsson > Jan Kratochvil > > * elfread.c (alloc_lzma, free_lzma): New functions. > (gdb_lzma_allocator): New global. > (struct lzma_stream): New. > (lzma_open, lzma_pread, lzma_close, lzma_stat) > (find_separate_debug_file_in_section): New functions. > (elf_symfile_read): Call find_separate_debug_file_in_section if no > other debuginfo is found. Should we put the lzma-support code into its own file? I think it would be cleaner, and also shows that this isn't really tied to ELF. Perhaps there will be compressed sections in other file formats, someday? To avoid the #ifdef HAVE_LZMA, I might even provide two versions of the file, one with the real implementation, and one with the phony one, and have the configure choose which one to link in. This isn't what we've been doing in the past (iconv, python), so to be taken with a grain of salt. I think it'll make the code a little easier to navigate, however. > * configure.ac: Check for lzma. > * configure, config.in: Rebuild. > * Makefile.in (LIBLZMA): New variable. > (CLIBS): Include LIBLZMA. > * NEWS: Mention mini debuginfo feature. Otherwise, nicely clean and documented code! -- Joel