From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17668 invoked by alias); 14 Oct 2011 15:49:45 -0000 Received: (qmail 17658 invoked by uid 22791); 14 Oct 2011 15:49:43 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 14 Oct 2011 15:49:28 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9EFnRm8007179 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 14 Oct 2011 11:49:27 -0400 Received: from host1.jankratochvil.net (ovpn-116-16.ams2.redhat.com [10.36.116.16]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p9EFnPAQ014317 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 14 Oct 2011 11:49:27 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p9EFnP8l030500; Fri, 14 Oct 2011 17:49:25 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p9EFnOwP030499; Fri, 14 Oct 2011 17:49:24 +0200 Date: Fri, 14 Oct 2011 16:00:00 -0000 From: Jan Kratochvil To: Aleksandar Ristovski Cc: gdb@sources.redhat.com, Mike Frysinger Subject: Re: working with split debug files and sectionless ELFs Message-ID: <20111014154924.GA30442@host1.jankratochvil.net> References: <201110121335.56792.vapier@gentoo.org> <201110141127.18567.vapier@gentoo.org> <4E985776.5080002@qnx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E985776.5080002@qnx.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-10/txt/msg00140.txt.bz2 On Fri, 14 Oct 2011 17:38:30 +0200, Aleksandar Ristovski wrote: > On 11-10-14 11:27 AM, Mike Frysinger wrote: > > check out symfile.c:find_separate_debug_file_by_debuglink(). i hacked it locally > > so that when get_debug_link_info() returns NULL, the code would fall back to > > searching for the basename(argv[0]) + ".debug" of the ELF in question. that > > seemed to do what i want: "just work". > > Ok, so the problem is that if debuglink is missing, gdb just gives up. > > FWIW, what you are proposing makes sense to me. Maybe make it an > optional behaviour? The problem is the ".debug" extension is stored in .debug_link and it is not assumed by GDB so far. And for example Debian does not use it at all. Using the ".debug" extension is too slow as the file needs to be checksummed first. One should use /usr/lib/debug/.build-id/ instead. Still the argument applies even /usr/lib/debug/.build-id/ is skipped without .debug_link. But for /usr/lib/debug/.build-id/ you do not need to assume any ".debug" suffix. Thanks, Jan