public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
* find-debuginfo.sh change for gdb index
@ 2010-06-29 22:32 Tom Tromey
  2010-06-29 23:21 ` Roland McGrath
  0 siblings, 1 reply; 27+ messages in thread
From: Tom Tromey @ 2010-06-29 22:32 UTC (permalink / raw)
  To: Project Archer; +Cc: pmatilai

Hi Panu.  Roland suggested I contact you as the Fedora RPM maintainer.

This patch adds gdb index creation to find-debuginfo.sh, in support of a
feature I'm proposing for Fedora 14:

    https://fedoraproject.org/wiki/Features/GdbIndex

I've tested this just by building some RPMs locally.

If you'd prefer, I can open a bug in bugzilla for this.

I don't know what other changes may be needed to ensure that the proper
gdb is in the buildroots when this script is run.  Also, the proper gdb
is not actually available yet; cleaning up that patch series is my next
task.

I think this should probably be local to Fedora, but if you think it
should go into upstream RPM, I am happy to try that.

Tom

--- find-debuginfo.sh.orig	2010-06-29 16:19:42.000000000 -0600
+++ find-debuginfo.sh	2010-06-29 15:52:08.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-gnu-index $d" > /dev/null 2>&1
+}
+
 # Make a relative symlink to $1 called $3$2
 shopt -s extglob
 link_relative()
@@ -224,9 +233,15 @@
     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
+
+    if [ -f "${debugfn}.index" ]; then
+      make_id_link "$id" "/usr/lib/debug$dn/$bn" .debug
+    fi
   fi
 done || exit
 

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2010-07-30 23:09 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-29 22:32 find-debuginfo.sh change for gdb index Tom Tromey
2010-06-29 23:21 ` Roland McGrath
2010-06-30 17:35   ` Tom Tromey
2010-06-30 18:14     ` Roland McGrath
2010-06-30 18:23       ` Tom Tromey
2010-06-30 20:42         ` Tom Tromey
2010-06-30 20:44           ` Roland McGrath
2010-06-30 21:25             ` Tom Tromey
2010-06-30 21:58               ` Tom Tromey
2010-06-30 22:00                 ` Tom Tromey
2010-06-30 22:14               ` Roland McGrath
2010-07-02 19:55                 ` Tom Tromey
2010-07-05  9:36                   ` Panu Matilainen
2010-07-05  9:48                     ` Jan Kratochvil
2010-07-05 10:39                       ` Panu Matilainen
2010-07-06 18:35                     ` Tom Tromey
2010-07-06 19:14                       ` Roland McGrath
2010-07-06 19:41                         ` Tom Tromey
2010-07-06 20:28                           ` Roland McGrath
2010-07-08 15:56                         ` Tom Tromey
2010-07-08 20:36                           ` Tom Tromey
2010-07-08 22:53                           ` Roland McGrath
2010-07-09  5:07                             ` Panu Matilainen
2010-07-09 17:48                               ` Tom Tromey
2010-07-30 21:36                                 ` Tom Tromey
2010-07-30 23:07                                   ` Roland McGrath
2010-07-30 23:09                                   ` Jan Kratochvil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).