From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27601 invoked by alias); 12 Oct 2011 17:36:16 -0000 Received: (qmail 27412 invoked by uid 22791); 12 Oct 2011 17:36:14 -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; Wed, 12 Oct 2011 17:35:58 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id DE07F1B4022 for ; Wed, 12 Oct 2011 17:35:56 +0000 (UTC) From: Mike Frysinger To: gdb@sourceware.org Subject: working with split debug files and sectionless ELFs Date: Wed, 12 Oct 2011 17:36:00 -0000 User-Agent: KMail/1.13.7 (Linux/3.1.0-rc4; KDE/4.6.5; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart41210739.eB3V2xKqbr"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201110121335.56792.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/msg00073.txt.bz2 --nextPart41210739.eB3V2xKqbr Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-length: 1460 i've been playing around with super stripping ELFs to the point where they = no=20 longer have ELF sections (since they're not used at runtime). all of this= =20 info has been preserved though in the split debug file. eu-strip makes thi= s=20 very easy to pull off: eu-strip /usr/bin/prog --strip-sections \ -f /usr/lib/debug/usr/bin/prog.debug first, it seems that --symbols silently conflicts with specifying binaries = on=20 the command line. so if i do: gdb prog --symbols=3D/usr/lib/debug/usr/bin/prog.debug the --symbols argument is silently ignored and gdb complains about no=20 debugging information found. if however i do: gdb --symbols=3D/usr/lib/debug/usr/bin/prog.debug --exec=3D/usr/bin/prog then everything works nicely. i can imagine that people aren't keen on=20 changing this behavior so it works (imo) a bit more naturally, but should w= e=20 at least have gdb warn that --symbols is ignored when given an executable o= n=20 the command line ? the --help output doesn't seem to mention this that i c= an=20 see. second, i wonder if we can't have this work more intelligently out of the b= ox.=20=20 is it unreasonable to have gdb automatically search /usr/lib/debug/ for spl= it=20 debuf files if the .gnu_debuglink section does not exist ? or at least do = it=20 if the ELF has no sections at all ? it'd be nice if we could do `gdb prog`= =20 and gdb is smart enough to at least check /usr/lib/debug/usr/bin/prog.debug. -mike --nextPart41210739.eB3V2xKqbr 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) iQIcBAABAgAGBQJOlc/8AAoJEEFjO5/oN/WBfjUP/0IxBBdaUBmWtlRINk9+fEOz FumI2H6+Ft3w/ecbwUNlN1yoSDGBgpQ7UpI4j6k1jklRR5I38ceVhqqBSZuIPbhq FSGG5zNNFw0wCsWdYil/QrZ9M/i4VE+oL/+qkpvGBQnf5dAKG+SgMsgOAOBNiF46 /0jsHP3n75JilTDrwXjQ45a++QJP6ulP6eoMxwk3b4WT8KdntRkoSQgI/lKjjg4+ qHGfDfdaO6OoopxnlVNnDT1Q8qsytoP1kFVTYxAKCL3fVkn6hmRFMvcrqfSaXa+V BdyY4gwwSfBwojS1QCOYrdw1l1vuMSGStqa6ExsEb3T2KxhdlNveRK3EW8ZGgjHC dfIBam8ory/skiiLKPdDRpVFrCRltQvkcw/aIV/kZYs0Q09Iqk7puvYObF5IgWHM ciVAxofbnWCv3wNeaCveXfuRXXlRSmIG7ASQfdWesD+MZRZpyNrq3CFRg8ueEg7S Uyh+DVC+7g3wUSyvp+C5AKLaZNU/OJ8nLJRY0vZk5K1VJHStUZ/ctGLpqFLv+OFh 0f6jy0L9F38Nd3EDa/56FBrFDXfHQH8UL99Dchnf2pq5x8hzSs0dK8N1JU/9wFJc +QTcZ007XCdA8hestZG46kosg5HKNiDQcWu0Q79+uPNPRRuJ0XwYDt+OS8wXdVNR mcHoYkiTz0Eaz+ACHp6t =TvEn -----END PGP SIGNATURE----- --nextPart41210739.eB3V2xKqbr--