From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1392 invoked by alias); 30 Jun 2010 20:42:42 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 1378 invoked by uid 22791); 30 Jun 2010 20:42:41 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org From: Tom Tromey To: Roland McGrath Cc: Project Archer , pmatilai@redhat.com Subject: Re: find-debuginfo.sh change for gdb index References: <20100629232147.C019548255@magilla.sf.frob.com> <20100630181436.518364C33C@magilla.sf.frob.com> Reply-To: Tom Tromey Date: Wed, 30 Jun 2010 20:42:00 -0000 In-Reply-To: (Tom Tromey's message of "Wed, 30 Jun 2010 12:23:11 -0600") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2010-q2/txt/msg00067.txt.bz2 Tom> It saves indices for all the loaded objfiles. Tom> I suppose I could add another argument so you can specify which one. I left this as-is. I renamed the command, though, since a different name made more sense to me once I wrote the gdb documentation. Here's a new find-debuginfo.sh patch. Tom --- 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