From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19843 invoked by alias); 10 Dec 2002 06:05:28 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 19836 invoked from network); 10 Dec 2002 06:05:27 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 10 Dec 2002 06:05:27 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id gBA5dvP21719 for ; Tue, 10 Dec 2002 00:39:57 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id gBA65RD11520 for ; Tue, 10 Dec 2002 01:05:27 -0500 Received: from localhost.redhat.com (romulus-int.sfbay.redhat.com [172.16.27.46]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id gBA65Pq12336; Tue, 10 Dec 2002 01:05:26 -0500 Received: by localhost.redhat.com (Postfix, from userid 469) id 615CFFF79; Tue, 10 Dec 2002 00:00:48 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15861.29951.564644.347349@localhost.redhat.com> Date: Mon, 09 Dec 2002 22:13:00 -0000 To: Jim Blandy Cc: gdb-patches@sources.redhat.com Subject: Re: RFC: support debug info in separate files In-Reply-To: References: X-SW-Source: 2002-12/txt/msg00317.txt.bz2 Jim Blandy writes: > > This patch, written by Alexander Larsson, allows GDB to use debug info > that has been extracted into a separate executable file, using the > "strip -f" command as provided in Ulrich Drepper's elfutils. This > allows a distribution to provide debug info in separate packages from > the executables it describes. > Actually thinking about this, where can one get a copy of elfutils? Could the same functionality be added to binutils? > If you've got all the previous patches I've posted (and if I haven't > botched anything), this should cause no test suite regressions, and > the results of running the test suite both with and without separated > debug info are identical. Starting with current GDB sources, the > other patches you need are: > > RFA: testsuite: pass optimization flag in the proper way > RFA: testsuite: attach.exp: don't move executables to /tmp > Re: RFC: allow syms_from_objfile to take a section offset table directly > RFC: Allow symbol_file_add to take section_offsets table > > To run the GDB test suite against executables with separated debug info, > see: http://sources.redhat.com/ml/gdb/2002-11/msg00202.html > and: http://sources.redhat.com/ml/gdb/2002-11/msg00215.html > > (Note: there is a bug in the elfutils strip that causes some stripped > executables to crash. This has been fixed only very recently, so > you'll need a bleeding-edge version of elfutils, or else you'll get > failures in try_catch.exp due to the inferior crashing.) > > If folks don't have concerns about this, I'll commit it on Fri Dec 6. > Some random comments... This works only for Elf. Will this interfere when other file formats are processed? (I haven't tried with a, say, coff file, which is impossible of course because this is elfutils based). > * utils.c (calc_crc32): New function. > * defs.h (calc_crc32): New declaration. Now we have 4 identical crc32's functions in gdb. Any chance to delete a few? For the debug file name suggest looking at HAVE_DOS_BASED_FILE_SYSTEM in libiberty, and its uses in gdb/source.c. [...] > + strcat (debugfile, ".debug/"); [...] > + strcat (debugfile, "/"); [...] > + strcat (debugfile, "/"); Should these be DIR_SEPARATOR instead? I guess DJGPP doesn't care though. In this message, http://sources.redhat.com/ml/gdb/2002-09/msg00312.html I pointed out a few things that could be done to improve this patch. For instance, instead of adding a completely new objfile that would be only for the debug info, add the debug info to the existing objfiles. I haven't had a chance to see if you changed the patch to do something different or not. It also seemed at that stage that we were gaining an extra copy of the minimal symbols, and this can bloat gdb even more. Was this changed? Other comments I pointed out in that message have been addressed by Alex already. Elena