From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6594 invoked by alias); 14 Oct 2006 23:45:56 -0000 Received: (qmail 6585 invoked by uid 22791); 14 Oct 2006 23:45:55 -0000 X-Spam-Check-By: sourceware.org Received: from 195.22.55.53.adsl.nextra.cz (HELO host0.dyn.jankratochvil.net) (195.22.55.53) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 14 Oct 2006 23:45:52 +0000 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.13.8/8.13.8) with ESMTP id k9ENjhRc014841; Sun, 15 Oct 2006 01:45:43 +0200 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.13.8/8.13.8/Submit) id k9ENjgra014837; Sun, 15 Oct 2006 01:45:42 +0200 Date: Sat, 14 Oct 2006 23:45:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Cc: Daniel Jacobowitz Subject: Re: Improve separate debug file support for elfutils Message-ID: <20061014234541.GA14820@host0.dyn.jankratochvil.net> References: <20061006202550.GA16735@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061006202550.GA16735@nevyn.them.org> User-Agent: Mutt/1.4.2.2i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00164.txt.bz2 Hi Daniel, thanks for this patch. Unfortunately using CVS + this patch the problem is still present: Reading symbols from /lib/modules/2.6.18-1.2747.fc6/kernel/fs/ext3/ext3.ko...Reading symbols from /usr/lib/debug/lib/modules/2.6.18-1.2747.fc6/kernel/fs/ext3/ext3.ko.debug...DW_FORM_strp pointing outside of .debug_str section [in module /usr/lib/debug/lib/modules/2.6.18-1.2747.fc6/kernel/fs/ext3/ext3.ko.debug] These two testfiles stored at: http://www.jankratochvil.net/priv/ext3-debug.tar.gz According to the error I believe the patch also needs to cover libbfd. Is it valid it still needs to be patched for this case? Jakub Jelinek was confirming before that elfutils produce in some way valid ELFs - with the missing strtab/symtab. I did not check the binaries myself. Thanks for info, Jan On Fri, 06 Oct 2006 22:25:50 +0200, Daniel Jacobowitz wrote: > It turns out that elfutils's eu-strip differs from objcopy --only-keep-debug > in one important respect: elfutils tends to leave .symtab in the original > file and put a NOBITS copy in the separate debug file, but objcopy moves the > whole symtab. This difference shows up a problem in GDB. > > We search for the section containing the PC in a bunch of places, mostly for > overlay support (does this even still work? no idea). When we look up the > section for the PC, we might find either the copy in the separate debug file > or the original; they cover the same PC ranges. So we need to allow the > two sections to be treated as equal. That's what this patch implements. > I'm not sure how well it would work with overlays - but I don't see a way, > even in theory, to do better. > > The change to "info sym" is a cosmetic improvement, which I made while > trying to find a way to test this portably. The original test was on ARM > with Thumb; we would try to look up the minsym to figure out whether to > set a 2-byte or 4-byte breakpoint, and by failing to find the minsym, > we set the wrong type. > > I plan to commit this, probably next week, unless someone happens to have > an idea for another solution. Tested x86_64-pc-linux-gnu. > > -- > Daniel Jacobowitz > CodeSourcery > > 2006-10-06 Daniel Jacobowitz > > * Makefile.in (symtab.o): Update. > * symtab.h (matching_bfd_section): New prototype. > * symtab.c (matching_bfd_section): New. > (find_pc_sect_psymbol, find_pc_sect_symtab): Use it. > * minsyms.c (lookup_minimal_symbol_by_pc_section): Likewise. > * printcmd.c (sym_info): Ignore separate debug objfiles. > > 2006-10-06 Daniel Jacobowitz > > * gdb.base/sepdebug.exp: Remove debug format test. > * lib/gdb.exp (gdb_gnu_strip_debug): Perform debug format test. > Handle no-symtab. > * gdb.base/sepsymtab.c, gdb.base/sepsymtab.exp: New. > [snip]