2017-12-10 22:00:49 +00:00
|
|
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
2017-12-04 19:24:00 +00:00
|
|
|
From: Fedora GDB patches <invalid@email.com>
|
|
|
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
2017-12-08 04:31:26 +00:00
|
|
|
Subject: RFC: add DWARF index support
|
2010-07-22 10:49:58 +00:00
|
|
|
|
2017-12-04 19:24:00 +00:00
|
|
|
FileName: gdb-gdb-add-index-script.patch
|
|
|
|
|
2017-12-08 04:31:26 +00:00
|
|
|
;; Provide /usr/bin/gdb-add-index for rpm-build (Tom Tromey).
|
|
|
|
;;=push: Re-check against the upstream version.
|
2017-12-04 19:24:00 +00:00
|
|
|
|
2017-12-08 04:31:26 +00:00
|
|
|
http://sourceware.org/ml/gdb-patches/2010-07/msg00184.html
|
2017-12-04 19:24:00 +00:00
|
|
|
|
2010-07-22 11:28:58 +00:00
|
|
|
Jan Kratochvil: Fixed $d -> $dir.
|
|
|
|
Jan Kratochvil: Remove /dev/null redirection.
|
|
|
|
|
2010-07-22 10:49:58 +00:00
|
|
|
>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
|
|
|
|
|
|
|
|
Tom> This patch series adds support for a DWARF index to gdb.
|
|
|
|
|
|
|
|
Roland suggested we wrap up the index-creation code into a helper
|
|
|
|
script.
|
|
|
|
|
|
|
|
I'm not sure if this is something people would want in gdb proper, but I
|
|
|
|
figured I would send it here just in case.
|
|
|
|
|
|
|
|
Tom
|
|
|
|
|
|
|
|
2010-07-09 Tom Tromey <tromey@redhat.com>
|
|
|
|
|
|
|
|
* Makefile.in (install-only): Install gdb-add-index.
|
|
|
|
* gdb-add-index: New file.
|
|
|
|
|
|
|
|
2010-07-09 Tom Tromey <tromey@redhat.com>
|
|
|
|
|
|
|
|
* gdb.texinfo (Index Files): Mention gdb-add-index.
|
|
|
|
|
|
|
|
>From 30714fe719e61baea03d0dc5793eb0d564faebb7 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Tom Tromey <tromey@redhat.com>
|
|
|
|
Date: Fri, 9 Jul 2010 11:17:54 -0600
|
|
|
|
Subject: [PATCH 4/4] add gdb-add-index
|
|
|
|
Subject: [PATCH 4/4] add gdb-add-index
|
|
|
|
---
|
2017-12-08 04:31:26 +00:00
|
|
|
gdb/Makefile.in | 9 +++++++++
|
|
|
|
gdb/doc/Makefile.in | 9 ++++++++-
|
|
|
|
gdb/doc/gdb.texinfo | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
3 files changed, 74 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
2018-01-10 19:21:10 +00:00
|
|
|
index e77d6a5c03..3142ad6af1 100644
|
2017-12-08 04:31:26 +00:00
|
|
|
--- a/gdb/Makefile.in
|
|
|
|
+++ b/gdb/Makefile.in
|
2018-01-10 19:21:10 +00:00
|
|
|
@@ -1770,6 +1770,15 @@ install-only: install-gstack $(CONFIG_INSTALL)
|
2014-02-07 18:38:14 +00:00
|
|
|
$(INSTALL_SCRIPT) gcore \
|
2013-04-11 17:07:45 +00:00
|
|
|
$(DESTDIR)$(bindir)/$$transformed_name; \
|
|
|
|
fi
|
2010-07-22 10:49:58 +00:00
|
|
|
+ transformed_name=`t='$(program_transform_name)'; \
|
|
|
|
+ echo gdb-add-index | sed -e "$$t"` ; \
|
|
|
|
+ if test "x$$transformed_name" = x; then \
|
|
|
|
+ transformed_name=gdb-add-index ; \
|
|
|
|
+ else \
|
|
|
|
+ true ; \
|
|
|
|
+ fi ; \
|
2014-02-07 18:38:14 +00:00
|
|
|
+ $(INSTALL_PROGRAM) $(srcdir)/contrib/gdb-add-index.sh \
|
2010-07-22 10:49:58 +00:00
|
|
|
+ $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT)
|
|
|
|
@$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
|
2012-01-03 15:00:12 +00:00
|
|
|
|
2014-02-07 18:38:14 +00:00
|
|
|
install-strip:
|
2017-12-08 04:31:26 +00:00
|
|
|
diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
|
2018-01-10 19:21:10 +00:00
|
|
|
index eafadee899..0323bc4ecb 100644
|
2017-12-08 04:31:26 +00:00
|
|
|
--- a/gdb/doc/Makefile.in
|
|
|
|
+++ b/gdb/doc/Makefile.in
|
|
|
|
@@ -174,7 +174,7 @@ POD2MAN5 = pod2man --center="GNU Development Tools" \
|
|
|
|
--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)
|
|
|
|
|
|
|
|
@@ -633,6 +633,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
|
|
|
|
+
|
|
|
|
gdbinit.5: $(GDB_DOC_FILES)
|
|
|
|
touch $@
|
|
|
|
-$(TEXI2POD) $(MANCONF) -Dgdbinit < $(srcdir)/gdb.texinfo > gdbinit.pod
|
|
|
|
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
|
2018-01-10 19:21:10 +00:00
|
|
|
index 2f2cbd3dea..7b99ae1551 100644
|
2017-12-08 04:31:26 +00:00
|
|
|
--- a/gdb/doc/gdb.texinfo
|
|
|
|
+++ b/gdb/doc/gdb.texinfo
|
2018-01-10 19:21:10 +00:00
|
|
|
@@ -19796,6 +19796,14 @@ There are currently some limitation on indices. They only work when
|
2010-07-22 10:49:58 +00:00
|
|
|
for DWARF debugging information, not stabs. And, they do not
|
|
|
|
currently work for programs using Ada.
|
|
|
|
|
|
|
|
+@value{GDBN} comes with a program, @command{gdb-add-index}, which can
|
|
|
|
+be used to add the index to a symbol file. It takes the symbol file
|
|
|
|
+as its only argument:
|
|
|
|
+
|
|
|
|
+@smallexample
|
|
|
|
+$ gdb-add-index symfile
|
|
|
|
+@end smallexample
|
|
|
|
+
|
|
|
|
@node Symbol Errors
|
|
|
|
@section Errors Reading Symbol Files
|
2010-11-17 02:58:16 +00:00
|
|
|
|
2018-01-10 19:21:10 +00:00
|
|
|
@@ -42759,6 +42767,7 @@ switch (die->tag)
|
2013-04-11 17:07:45 +00:00
|
|
|
* 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
|
2018-01-10 19:21:10 +00:00
|
|
|
@@ -43435,6 +43444,54 @@ Richard M. Stallman and Roland H. Pesch, July 1991.
|
2017-12-08 04:31:26 +00:00
|
|
|
@end ifset
|
|
|
|
@c man end
|
|
|
|
|
2013-04-11 17:07:45 +00:00
|
|
|
+@node gdb-add-index man
|
|
|
|
+@heading gdb-add-index
|
|
|
|
+
|
|
|
|
+@c man title gdb-add-index Add index files to speed up GDB
|
|
|
|
+
|
|
|
|
+@c man begin SYNOPSIS gdb-add-index
|
|
|
|
+gdb-add-index @var{filename}
|
|
|
|
+@c man end
|
|
|
|
+
|
|
|
|
+@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.
|
|
|
|
+
|
|
|
|
+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
|
|
|
|
+
|
2017-12-08 04:31:26 +00:00
|
|
|
+@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
|
|
|
|
+
|
|
|
|
@include gpl.texi
|
|
|
|
|
|
|
|
@node GNU Free Documentation License
|
|
|
|
--
|
|
|
|
2.14.3
|
|
|
|
|