From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19846 invoked by alias); 14 Oct 2011 17:08:11 -0000 Received: (qmail 19832 invoked by uid 22791); 14 Oct 2011 17:08:09 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 14 Oct 2011 17:07:55 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 0569D1B4001; Fri, 14 Oct 2011 17:07:55 +0000 (UTC) From: Mike Frysinger To: Jan Kratochvil Subject: Re: working with split debug files and sectionless ELFs Date: Fri, 14 Oct 2011 17:20:00 -0000 User-Agent: KMail/1.13.7 (Linux/3.1.0-rc4; KDE/4.6.5; x86_64; ; ) Cc: Aleksandar Ristovski , gdb@sources.redhat.com References: <201110121335.56792.vapier@gentoo.org> <4E985776.5080002@qnx.com> <20111014154924.GA30442@host1.jankratochvil.net> In-Reply-To: <20111014154924.GA30442@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1427322.siuWsQYU7B"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201110141307.54843.vapier@gentoo.org> 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/msg00149.txt.bz2 --nextPart1427322.siuWsQYU7B Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-length: 1386 On Friday 14 October 2011 11:49:24 Jan Kratochvil wrote: > 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". > >=20 > > Ok, so the problem is that if debuglink is missing, gdb just gives up. > >=20 > > FWIW, what you are proposing makes sense to me. Maybe make it an > > optional behaviour? >=20 > 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. that's why it was a hack. i think it reasonable that if there is no debug= =20 info to first look for the file name itself, and then look for the file nam= e with=20 a .debug suffix. so `gdb prog` where prog is found at /usr/bin/prog would default to=20 /usr/lib/debug/usr/bin/prog followed by /usr/lib/debug/usr/bin/prog.debug (= and=20 obviously /usr/lib/debug/ is the existing configurable setup and not a=20 hardcoded path). i'm thinking of the fallback/default behavior here. none of this would=20 preclude the existing explicit options that gdb has available. -mike --nextPart1427322.siuWsQYU7B Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. Content-length: 836 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJOmGxqAAoJEEFjO5/oN/WBTeAP/2q24bkvqvZJZ+FUosOWdmJw lGTmmZvq1RMgOAcGi4gH4sR1XZMqcxczpU6NTon1TRVf3bgxlVvrcCIY6mWsCHZk Fg4Jnq6cKVEaMYY2ZAWsyCX3rceCS12+1LYEeinafiPXJ78+Z4L2QoBjXStpGBG0 WdNV+cahFxC/SlocPXIJQ94WpHID7sa21ulOgxjCBYCHJajHoSFeJalA81K66PtK XJZkbo85jTjrlQl2kNDgqRFBlmFifdwrbrAfuEtrPgiYHvDPcAsSdYJtImqedpPh J58ctofz8e8l6okzhTVa/wKXjPCY/NJyROPSDAqWlwyw3FyEhmtAOv1bGq/o0tUW D3DdgxyaYe07bVcepbvm3kr6shwZMxf65T5mVFdg2AgPGtbldZ58ZRup2IZxV9AF H35X/dJeRyHIV1VzE5aErvNmt9DV7O4g+PmsK5HuXDEDcCSHb/XG51PGtkl2EqmI 5b4Qav+frtP3P4cMIEg7y1tZs8M9p51DbJ5piKJH2OudPHO26mORDk+/Rfw9rDho jC6yAH8nVseoPOhB61JZs3JXjUZtEjOarFE2L4hEcwbpIKc9eU+zTqJceVSEUa8+ 1P12QuNuy32ulutA8qiaBRiI1OasiZKYUVO9TIFIzwbGm3kUHlopTDVWA4wAp/0e UonbRrYb58s93M9rGUSG =Hf59 -----END PGP SIGNATURE----- --nextPart1427322.siuWsQYU7B--