From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13952 invoked by alias); 5 Jul 2010 09:36:44 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 13937 invoked by uid 22791); 5 Jul 2010 09:36:42 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Date: Mon, 05 Jul 2010 09:36:00 -0000 From: Panu Matilainen To: Tom Tromey cc: Roland McGrath , Project Archer Subject: Re: find-debuginfo.sh change for gdb index In-Reply-To: Message-ID: References: <20100629232147.C019548255@magilla.sf.frob.com> <20100630181436.518364C33C@magilla.sf.frob.com> <20100630204424.3DCE34C33C@magilla.sf.frob.com> <20100630221406.254AC4C33E@magilla.sf.frob.com> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-SW-Source: 2010-q3/txt/msg00004.txt.bz2 On Fri, 2 Jul 2010, Tom Tromey wrote: > Tom> For a symbol file X, it looks for X.gdb-index. > > Roland> It's not clear to me what that means in the separate .debug case. > Roland> If "symbol file" means the file with the DWARF, then that file is > Roland> foo.debug so you will be looking for foo.debug.gdb-index. > > Right, that is what we do. > > Roland> I think it is preferable for the packaging not to add the new symlinks. > Roland> It doesn't seem like we really need them, since you can look at the > Roland> .build-id/xx/yyy.debug symlink target name instead. > > Sounds good. > > In this case I think the most recent patch I sent is the one to use. So it would be this patch, right? --- find-debuginfo.sh.orig 2010-06-29 16:19:42.000000000 -0600 +++ find-debuginfo.sh 2010-06-30 14:41:19.000000000 -0600 @@ -96,6 +96,15 @@ chmod 444 "$1" || exit } +# Create a .gdb-index file for $1. +make_gdb_index() +{ + local f="$1" + local d="${f%/*}" + # We don't care if gdb gives an error. + gdb --batch-silent -ex "file $f" -ex "maintenance save-gdb-index $d" > /dev/null 2>&1 +} + # Make a relative symlink to $1 called $3$2 shopt -s extglob link_relative() @@ -224,6 +233,8 @@ chmod u-w "$f" fi + make_gdb_index "$debugfn" + if [ -n "$id" ]; then make_id_link "$id" "$dn/$(basename $f)" make_id_link "$id" "/usr/lib/debug$dn/$bn" .debug Is the necessary patch(es) already in rawhide gdb, I dont see anything obviously related in gdb changelogs? One thing this does is that it forces rpm-build to depend on gdb, which hardly is the end of the world, just something to note. - Panu -