X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=gdb-gdb-add-index-script.patch;h=da88642348651718e16583a5a9dbf5379dac3428;hb=56f642b4a4de30d337823b43f70c5c606fd93a82;hp=1c145ace30d6ed36696c427f0d9aff30cce1f037;hpb=6ed6bacf4ba8864535cd04c8acc393016fcf805d;p=packages%2Fgdb.git diff --git a/gdb-gdb-add-index-script.patch b/gdb-gdb-add-index-script.patch index 1c145ac..da88642 100644 --- a/gdb-gdb-add-index-script.patch +++ b/gdb-gdb-add-index-script.patch @@ -40,16 +40,14 @@ Subject: [PATCH 4/4] add gdb-add-index 5 files changed, 57 insertions(+), 1 deletions(-) create mode 100755 gdb/gdb-add-index -Index: gdb-7.2.50.20101116/gdb/Makefile.in +Index: gdb-7.6.90.20140127/gdb/Makefile.in =================================================================== ---- gdb-7.2.50.20101116.orig/gdb/Makefile.in 2010-11-16 08:03:17.000000000 +0100 -+++ gdb-7.2.50.20101116/gdb/Makefile.in 2010-11-16 08:47:45.000000000 +0100 -@@ -986,7 +986,16 @@ install-only: install-gstack $(CONFIG_IN - $(SHELL) $(srcdir)/../mkinstalldirs \ - $(DESTDIR)$(man1dir) ; \ - $(INSTALL_DATA) $(srcdir)/gdb.1 \ -- $(DESTDIR)$(man1dir)/$$transformed_name.1 -+ $(DESTDIR)$(man1dir)/$$transformed_name.1; \ +--- gdb-7.6.90.20140127.orig/gdb/Makefile.in 2014-02-06 17:37:54.555975958 +0100 ++++ gdb-7.6.90.20140127/gdb/Makefile.in 2014-02-06 17:38:52.110038415 +0100 +@@ -1093,6 +1093,15 @@ install-only: install-gstack $(CONFIG_IN + $(INSTALL_SCRIPT) gcore \ + $(DESTDIR)$(bindir)/$$transformed_name; \ + fi + transformed_name=`t='$(program_transform_name)'; \ + echo gdb-add-index | sed -e "$$t"` ; \ + if test "x$$transformed_name" = x; then \ @@ -57,16 +55,16 @@ Index: gdb-7.2.50.20101116/gdb/Makefile.in + else \ + true ; \ + fi ; \ -+ $(INSTALL_PROGRAM) $(srcdir)/gdb-add-index \ ++ $(INSTALL_PROGRAM) $(srcdir)/contrib/gdb-add-index.sh \ + $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do - .PHONY: install-tui - install-tui: -Index: gdb-7.2.50.20101116/gdb/doc/gdb.texinfo + + install-strip: +Index: gdb-7.6.90.20140127/gdb/doc/gdb.texinfo =================================================================== ---- gdb-7.2.50.20101116.orig/gdb/doc/gdb.texinfo 2010-11-16 08:04:18.000000000 +0100 -+++ gdb-7.2.50.20101116/gdb/doc/gdb.texinfo 2010-11-16 08:56:30.000000000 +0100 -@@ -15500,6 +15500,14 @@ There are currently some limitation on i +--- gdb-7.6.90.20140127.orig/gdb/doc/gdb.texinfo 2014-02-06 17:37:50.822971940 +0100 ++++ gdb-7.6.90.20140127/gdb/doc/gdb.texinfo 2014-02-06 17:37:54.565975968 +0100 +@@ -17749,6 +17749,14 @@ There are currently some limitation on i for DWARF debugging information, not stabs. And, they do not currently work for programs using Ada. @@ -81,38 +79,93 @@ Index: gdb-7.2.50.20101116/gdb/doc/gdb.texinfo @node Symbol Errors @section Errors Reading Symbol Files -Index: gdb-7.2.50.20101116/gdb/gdb-add-index -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.2.50.20101116/gdb/gdb-add-index 2010-11-16 08:47:45.000000000 +0100 -@@ -0,0 +1,30 @@ -+#! /bin/sh +@@ -43878,6 +43886,7 @@ switch (die->tag) + * gdbserver man:: Remote Server for the GNU Debugger man page + * gcore man:: Generate a core file of a running program + * gdbinit man:: gdbinit scripts ++* gdb-add-index man:: Add index files to speed up GDB + @end menu + + @node gdb man +@@ -44530,6 +44539,54 @@ gdb(1), @code{info -f gdb -n Startup} + The full documentation for @value{GDBN} is maintained as a Texinfo manual. + If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo + documentation are properly installed at your site, the command ++ ++@smallexample ++info gdb ++@end smallexample ++ ++should give you access to the complete manual. ++ ++@cite{Using GDB: A Guide to the GNU Source-Level Debugger}, ++Richard M. Stallman and Roland H. Pesch, July 1991. ++@end ifset ++@c man end + -+# Add a .gdb_index section to a file. ++@node gdb-add-index man ++@heading gdb-add-index + -+# Copyright (C) 2010 Free Software Foundation, Inc. -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 3 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program. If not, see . ++@c man title gdb-add-index Add index files to speed up GDB + -+file="$1" -+dir="${file%/*}" ++@c man begin SYNOPSIS gdb-add-index ++gdb-add-index @var{filename} ++@c man end + -+# We don't care if gdb gives an error. -+gdb -nx --batch-silent -ex "file $file" -ex "save gdb-index $dir" ++@c man begin DESCRIPTION gdb-add-index ++When GDB finds a symbol file, it scans the symbols in the file in order ++to construct an internal symbol table. This lets most GDB operations ++work quickly--at the cost of a delay early on. For large programs, ++this delay can be quite lengthy, so GDB provides a way to build an ++index, which speeds up startup. + -+if test -f "${file}.gdb-index"; then -+ objcopy --add-section .gdb_index="${file}.gdb-index" --set-section-flags .gdb_index=readonly "$file" "$file" -+ rm -f "${file}.gdb-index" -+fi ++To determine whether a file contains such an index, use the command ++@command{readelf -S filename}: the index is stored in a section named ++@code{.gdb_index}. Note that the index is never generated for files that do ++not contain DWARF debug information (sections named @code{.debug_*}). ++ ++See more in ++@ifset man ++the @value{GDBN} manual in node @code{Index Files} ++-- shell command @code{info -f gdb -n 'Index Files'}. ++@end ifset ++@ifclear man ++@ref{Index Files}. ++@end ifclear ++@c man end ++ ++@c man begin SEEALSO gdb-add-index ++@ifset man ++The full documentation for @value{GDBN} is maintained as a Texinfo manual. ++If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo ++documentation are properly installed at your site, the command + + @smallexample + info gdb +Index: gdb-7.6.90.20140127/gdb/doc/Makefile.in +=================================================================== +--- gdb-7.6.90.20140127.orig/gdb/doc/Makefile.in 2014-02-06 17:37:50.824971942 +0100 ++++ gdb-7.6.90.20140127/gdb/doc/Makefile.in 2014-02-06 17:37:54.565975968 +0100 +@@ -165,7 +165,7 @@ POD2MAN5 = pod2man --center="GNU Develop + --release="gdb-`sed q version.subst`" --section=5 + + # List of man pages generated from gdb.texi +-MAN1S = gdb.1 gdbserver.1 gcore.1 ++MAN1S = gdb.1 gdbserver.1 gcore.1 gdb-add-index.1 + MAN5S = gdbinit.5 + MANS = $(MAN1S) $(MAN5S) + +@@ -590,6 +590,13 @@ gcore.1: $(GDB_DOC_FILES) + mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) + rm -f gcore.pod + ++gdb-add-index.1: $(GDB_DOC_FILES) ++ touch $@ ++ -$(TEXI2POD) $(MANCONF) -Dgdb-add-index < $(srcdir)/gdb.texinfo > gdb-add-index.pod ++ -($(POD2MAN1) gdb-add-index.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ ++ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) ++ rm -f gdb-add-index.pod + -+exit 0 + gdbinit.5: $(GDB_DOC_FILES) + touch $@ + -$(TEXI2POD) $(MANCONF) -Dgdbinit < $(srcdir)/gdb.texinfo > gdbinit.pod