Provide man page for gcore.1 and gdb-add-index.1 (BZ 881892).

This commit is contained in:
Jan Kratochvil 2013-04-11 19:07:45 +02:00
parent 9b8aeef05e
commit cf0b61abc0
6 changed files with 888 additions and 72 deletions

View File

@ -4,11 +4,11 @@
to install and uninstall. to install and uninstall.
* gstack.sh, gstack.1: New files. * gstack.sh, gstack.1: New files.
Index: gdb-7.4.50.20120103/gdb/Makefile.in Index: gdb-7.5.91.20130407/gdb/Makefile.in
=================================================================== ===================================================================
--- gdb-7.4.50.20120103.orig/gdb/Makefile.in 2012-01-03 05:52:15.000000000 +0100 --- gdb-7.5.91.20130407.orig/gdb/Makefile.in 2013-04-11 16:50:33.000000000 +0200
+++ gdb-7.4.50.20120103/gdb/Makefile.in 2012-01-03 05:53:25.974210230 +0100 +++ gdb-7.5.91.20130407/gdb/Makefile.in 2013-04-11 16:52:51.032280294 +0200
@@ -1017,7 +1017,7 @@ gdb.z:gdb.1 @@ -1027,7 +1027,7 @@ info install-info clean-info dvi pdf ins
install: all install: all
@$(MAKE) $(FLAGS_TO_PASS) install-only @$(MAKE) $(FLAGS_TO_PASS) install-only
@ -17,7 +17,7 @@ Index: gdb-7.4.50.20120103/gdb/Makefile.in
transformed_name=`t='$(program_transform_name)'; \ transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e "$$t"` ; \ echo gdb | sed -e "$$t"` ; \
if test "x$$transformed_name" = x; then \ if test "x$$transformed_name" = x; then \
@@ -1039,7 +1039,25 @@ install-only: $(CONFIG_INSTALL) @@ -1058,7 +1058,25 @@ install-only: $(CONFIG_INSTALL)
install-python: install-python:
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
@ -44,8 +44,8 @@ Index: gdb-7.4.50.20120103/gdb/Makefile.in
transformed_name=`t='$(program_transform_name)'; \ transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e $$t` ; \ echo gdb | sed -e $$t` ; \
if test "x$$transformed_name" = x; then \ if test "x$$transformed_name" = x; then \
@@ -1051,6 +1069,18 @@ uninstall: force $(CONFIG_UNINSTALL) @@ -1081,6 +1099,18 @@ uninstall: force $(CONFIG_UNINSTALL)
$(DESTDIR)$(man1dir)/$$transformed_name.1 fi
@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
+.PHONY: uninstall-gstack +.PHONY: uninstall-gstack
@ -63,10 +63,10 @@ Index: gdb-7.4.50.20120103/gdb/Makefile.in
# The C++ name parser can be built standalone for testing. # The C++ name parser can be built standalone for testing.
test-cp-name-parser.o: cp-name-parser.c test-cp-name-parser.o: cp-name-parser.c
$(COMPILE) -DTEST_CPNAMES cp-name-parser.c $(COMPILE) -DTEST_CPNAMES cp-name-parser.c
Index: gdb-7.4.50.20120103/gdb/gstack.sh Index: gdb-7.5.91.20130407/gdb/gstack.sh
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.4.50.20120103/gdb/gstack.sh 2012-01-03 05:52:37.278385632 +0100 +++ gdb-7.5.91.20130407/gdb/gstack.sh 2013-04-11 16:52:22.093281616 +0200
@@ -0,0 +1,43 @@ @@ -0,0 +1,43 @@
+#!/bin/sh +#!/bin/sh
+ +
@ -111,10 +111,10 @@ Index: gdb-7.4.50.20120103/gdb/gstack.sh
+ -e 's/^\((gdb) \)*//' \ + -e 's/^\((gdb) \)*//' \
+ -e '/^#/p' \ + -e '/^#/p' \
+ -e '/^Thread/p' + -e '/^Thread/p'
Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/gstack.exp Index: gdb-7.5.91.20130407/gdb/testsuite/gdb.base/gstack.exp
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.4.50.20120103/gdb/testsuite/gdb.base/gstack.exp 2012-01-03 05:52:37.279385629 +0100 +++ gdb-7.5.91.20130407/gdb/testsuite/gdb.base/gstack.exp 2013-04-11 16:52:22.093281616 +0200
@@ -0,0 +1,66 @@ @@ -0,0 +1,66 @@
+# Copyright (C) 2012 Free Software Foundation, Inc. +# Copyright (C) 2012 Free Software Foundation, Inc.
+ +
@ -182,10 +182,10 @@ Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/gstack.exp
+gdb_exit +gdb_exit
+ +
+remote_exec host "kill -9 $pid" +remote_exec host "kill -9 $pid"
Index: gdb-7.4.50.20120103/gdb/testsuite/gdb.base/gstack.c Index: gdb-7.5.91.20130407/gdb/testsuite/gdb.base/gstack.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.4.50.20120103/gdb/testsuite/gdb.base/gstack.c 2012-01-03 05:52:37.279385629 +0100 +++ gdb-7.5.91.20130407/gdb/testsuite/gdb.base/gstack.c 2013-04-11 16:52:22.093281616 +0200
@@ -0,0 +1,43 @@ @@ -0,0 +1,43 @@
+/* This testcase is part of GDB, the GNU debugger. +/* This testcase is part of GDB, the GNU debugger.
+ +

View File

@ -1,7 +1,7 @@
Index: gdb-7.5.50.20130310/gdb/event-top.c Index: gdb-7.5.91.20130407/gdb/event-top.c
=================================================================== ===================================================================
--- gdb-7.5.50.20130310.orig/gdb/event-top.c 2013-01-31 19:37:37.000000000 +0100 --- gdb-7.5.91.20130407.orig/gdb/event-top.c 2013-01-31 19:37:37.000000000 +0100
+++ gdb-7.5.50.20130310/gdb/event-top.c 2013-03-10 16:44:05.471586917 +0100 +++ gdb-7.5.91.20130407/gdb/event-top.c 2013-04-11 16:53:03.230280376 +0200
@@ -36,6 +36,7 @@ @@ -36,6 +36,7 @@
#include "continuations.h" #include "continuations.h"
#include "gdbcmd.h" /* for dont_repeat() */ #include "gdbcmd.h" /* for dont_repeat() */
@ -28,10 +28,10 @@ Index: gdb-7.5.50.20130310/gdb/event-top.c
/* Each interpreter has its own rules on displaying the command /* Each interpreter has its own rules on displaying the command
prompt. */ prompt. */
if (!current_interp_display_prompt_p ()) if (!current_interp_display_prompt_p ())
Index: gdb-7.5.50.20130310/gdb/elfread.c Index: gdb-7.5.91.20130407/gdb/elfread.c
=================================================================== ===================================================================
--- gdb-7.5.50.20130310.orig/gdb/elfread.c 2013-03-10 16:38:01.000000000 +0100 --- gdb-7.5.91.20130407.orig/gdb/elfread.c 2013-04-11 16:53:00.000000000 +0200
+++ gdb-7.5.50.20130310/gdb/elfread.c 2013-03-10 16:44:05.472586918 +0100 +++ gdb-7.5.91.20130407/gdb/elfread.c 2013-04-11 16:53:03.231280376 +0200
@@ -49,6 +49,7 @@ @@ -49,6 +49,7 @@
#include "gdbcore.h" #include "gdbcore.h"
#include "gdbcmd.h" #include "gdbcmd.h"
@ -40,7 +40,7 @@ Index: gdb-7.5.50.20130310/gdb/elfread.c
#include <sys/stat.h> #include <sys/stat.h>
extern void _initialize_elfread (void); extern void _initialize_elfread (void);
@@ -1628,8 +1629,361 @@ build_id_to_filename (const struct elf_b @@ -1629,8 +1630,361 @@ build_id_to_filename (const struct elf_b
return retval; return retval;
} }
@ -403,7 +403,7 @@ Index: gdb-7.5.50.20130310/gdb/elfread.c
avoidance. */ avoidance. */
struct missing_filepair struct missing_filepair
@@ -1683,11 +2037,17 @@ missing_filepair_change (void) @@ -1684,11 +2038,17 @@ missing_filepair_change (void)
/* All their memory came just from missing_filepair_OBSTACK. */ /* All their memory came just from missing_filepair_OBSTACK. */
missing_filepair_hash = NULL; missing_filepair_hash = NULL;
} }
@ -421,7 +421,7 @@ Index: gdb-7.5.50.20130310/gdb/elfread.c
missing_filepair_change (); missing_filepair_change ();
} }
@@ -1754,14 +2114,35 @@ debug_print_missing (const char *binary, @@ -1755,14 +2115,35 @@ debug_print_missing (const char *binary,
*slot = missing_filepair; *slot = missing_filepair;
@ -464,10 +464,10 @@ Index: gdb-7.5.50.20130310/gdb/elfread.c
} }
static char * static char *
Index: gdb-7.5.50.20130310/gdb/symfile.h Index: gdb-7.5.91.20130407/gdb/symfile.h
=================================================================== ===================================================================
--- gdb-7.5.50.20130310.orig/gdb/symfile.h 2013-03-10 16:37:41.000000000 +0100 --- gdb-7.5.91.20130407.orig/gdb/symfile.h 2013-04-11 16:53:00.000000000 +0200
+++ gdb-7.5.50.20130310/gdb/symfile.h 2013-03-10 16:44:23.409591946 +0100 +++ gdb-7.5.91.20130407/gdb/symfile.h 2013-04-11 16:53:03.231280376 +0200
@@ -598,6 +598,8 @@ extern struct elf_build_id *build_id_add @@ -598,6 +598,8 @@ extern struct elf_build_id *build_id_add
extern char *build_id_to_filename (const struct elf_build_id *build_id, extern char *build_id_to_filename (const struct elf_build_id *build_id,
char **link_return, int add_debug_suffix); char **link_return, int add_debug_suffix);
@ -477,10 +477,10 @@ Index: gdb-7.5.50.20130310/gdb/symfile.h
/* From dwarf2read.c */ /* From dwarf2read.c */
Index: gdb-7.5.50.20130310/gdb/testsuite/lib/gdb.exp Index: gdb-7.5.91.20130407/gdb/testsuite/lib/gdb.exp
=================================================================== ===================================================================
--- gdb-7.5.50.20130310.orig/gdb/testsuite/lib/gdb.exp 2013-03-10 16:17:15.000000000 +0100 --- gdb-7.5.91.20130407.orig/gdb/testsuite/lib/gdb.exp 2013-04-11 16:53:00.000000000 +0200
+++ gdb-7.5.50.20130310/gdb/testsuite/lib/gdb.exp 2013-03-10 16:44:05.474586918 +0100 +++ gdb-7.5.91.20130407/gdb/testsuite/lib/gdb.exp 2013-04-11 16:53:03.232280376 +0200
@@ -1482,7 +1482,7 @@ proc default_gdb_start { } { @@ -1482,7 +1482,7 @@ proc default_gdb_start { } {
warning "Couldn't set the width to 0." warning "Couldn't set the width to 0."
} }
@ -490,10 +490,10 @@ Index: gdb-7.5.50.20130310/gdb/testsuite/lib/gdb.exp
send_gdb "set build-id-verbose 0\n" send_gdb "set build-id-verbose 0\n"
gdb_expect 10 { gdb_expect 10 {
-re "$gdb_prompt $" { -re "$gdb_prompt $" {
Index: gdb-7.5.50.20130310/gdb/testsuite/lib/mi-support.exp Index: gdb-7.5.91.20130407/gdb/testsuite/lib/mi-support.exp
=================================================================== ===================================================================
--- gdb-7.5.50.20130310.orig/gdb/testsuite/lib/mi-support.exp 2013-03-10 16:17:15.000000000 +0100 --- gdb-7.5.91.20130407.orig/gdb/testsuite/lib/mi-support.exp 2013-04-11 16:53:00.000000000 +0200
+++ gdb-7.5.50.20130310/gdb/testsuite/lib/mi-support.exp 2013-03-10 16:44:05.475586918 +0100 +++ gdb-7.5.91.20130407/gdb/testsuite/lib/mi-support.exp 2013-04-11 16:53:03.233280376 +0200
@@ -212,7 +212,7 @@ proc default_mi_gdb_start { args } { @@ -212,7 +212,7 @@ proc default_mi_gdb_start { args } {
warning "Couldn't set the width to 0." warning "Couldn't set the width to 0."
} }
@ -503,10 +503,10 @@ Index: gdb-7.5.50.20130310/gdb/testsuite/lib/mi-support.exp
send_gdb "190-gdb-set build-id-verbose 0\n" send_gdb "190-gdb-set build-id-verbose 0\n"
gdb_expect 10 { gdb_expect 10 {
-re ".*190-gdb-set build-id-verbose 0\r\n190\\\^done\r\n$mi_gdb_prompt$" { -re ".*190-gdb-set build-id-verbose 0\r\n190\\\^done\r\n$mi_gdb_prompt$" {
Index: gdb-7.5.50.20130310/gdb/tui/tui-interp.c Index: gdb-7.5.91.20130407/gdb/tui/tui-interp.c
=================================================================== ===================================================================
--- gdb-7.5.50.20130310.orig/gdb/tui/tui-interp.c 2013-01-01 07:41:30.000000000 +0100 --- gdb-7.5.91.20130407.orig/gdb/tui/tui-interp.c 2013-01-01 07:41:30.000000000 +0100
+++ gdb-7.5.50.20130310/gdb/tui/tui-interp.c 2013-03-10 16:44:05.475586918 +0100 +++ gdb-7.5.91.20130407/gdb/tui/tui-interp.c 2013-04-11 16:53:03.233280376 +0200
@@ -30,6 +30,7 @@ @@ -30,6 +30,7 @@
#include "tui/tui.h" #include "tui/tui.h"
#include "tui/tui-io.h" #include "tui/tui-io.h"
@ -515,10 +515,10 @@ Index: gdb-7.5.50.20130310/gdb/tui/tui-interp.c
/* Set to 1 when the TUI mode must be activated when we first start /* Set to 1 when the TUI mode must be activated when we first start
gdb. */ gdb. */
Index: gdb-7.5.50.20130310/gdb/aclocal.m4 Index: gdb-7.5.91.20130407/gdb/aclocal.m4
=================================================================== ===================================================================
--- gdb-7.5.50.20130310.orig/gdb/aclocal.m4 2013-01-17 12:06:26.000000000 +0100 --- gdb-7.5.91.20130407.orig/gdb/aclocal.m4 2013-01-17 12:06:26.000000000 +0100
+++ gdb-7.5.50.20130310/gdb/aclocal.m4 2013-03-10 16:44:05.475586918 +0100 +++ gdb-7.5.91.20130407/gdb/aclocal.m4 2013-04-11 16:53:03.234280376 +0200
@@ -11,6 +11,164 @@ @@ -11,6 +11,164 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. # PARTICULAR PURPOSE.
@ -684,10 +684,10 @@ Index: gdb-7.5.50.20130310/gdb/aclocal.m4
# AM_CONDITIONAL -*- Autoconf -*- # AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
Index: gdb-7.5.50.20130310/gdb/config.in Index: gdb-7.5.91.20130407/gdb/config.in
=================================================================== ===================================================================
--- gdb-7.5.50.20130310.orig/gdb/config.in 2012-12-09 19:39:58.000000000 +0100 --- gdb-7.5.91.20130407.orig/gdb/config.in 2012-12-09 19:39:58.000000000 +0100
+++ gdb-7.5.50.20130310/gdb/config.in 2013-03-10 16:44:05.476586918 +0100 +++ gdb-7.5.91.20130407/gdb/config.in 2013-04-11 16:53:03.234280376 +0200
@@ -33,6 +33,9 @@ @@ -33,6 +33,9 @@
/* Define to BFD's default target vector. */ /* Define to BFD's default target vector. */
#undef DEFAULT_BFD_VEC #undef DEFAULT_BFD_VEC
@ -708,12 +708,12 @@ Index: gdb-7.5.50.20130310/gdb/config.in
/* Define to 1 if you have the <libunwind-ia64.h> header file. */ /* Define to 1 if you have the <libunwind-ia64.h> header file. */
#undef HAVE_LIBUNWIND_IA64_H #undef HAVE_LIBUNWIND_IA64_H
Index: gdb-7.5.50.20130310/gdb/configure Index: gdb-7.5.91.20130407/gdb/configure
=================================================================== ===================================================================
--- gdb-7.5.50.20130310.orig/gdb/configure 2013-01-09 18:21:33.000000000 +0100 --- gdb-7.5.91.20130407.orig/gdb/configure 2013-04-11 16:50:50.000000000 +0200
+++ gdb-7.5.50.20130310/gdb/configure 2013-03-10 16:44:05.480586919 +0100 +++ gdb-7.5.91.20130407/gdb/configure 2013-04-11 16:53:13.077280119 +0200
@@ -683,6 +683,11 @@ REPORT_BUGS_TO @@ -686,6 +686,11 @@ PKGVERSION
PKGVERSION HAVE_NATIVE_GCORE_TARGET
TARGET_OBS TARGET_OBS
subdirs subdirs
+RPM_LIBS +RPM_LIBS
@ -724,7 +724,7 @@ Index: gdb-7.5.50.20130310/gdb/configure
GDB_DATADIR GDB_DATADIR
DEBUGDIR DEBUGDIR
MAKEINFO_EXTRA_FLAGS MAKEINFO_EXTRA_FLAGS
@@ -783,6 +788,7 @@ with_gdb_datadir @@ -786,6 +791,7 @@ with_gdb_datadir
with_relocated_sources with_relocated_sources
with_auto_load_dir with_auto_load_dir
with_auto_load_safe_path with_auto_load_safe_path
@ -732,7 +732,7 @@ Index: gdb-7.5.50.20130310/gdb/configure
enable_targets enable_targets
enable_64_bit_bfd enable_64_bit_bfd
enable_gdbcli enable_gdbcli
@@ -831,6 +837,11 @@ CPPFLAGS @@ -834,6 +840,11 @@ CPPFLAGS
CPP CPP
MAKEINFO MAKEINFO
MAKEINFOFLAGS MAKEINFOFLAGS
@ -744,7 +744,7 @@ Index: gdb-7.5.50.20130310/gdb/configure
YACC YACC
YFLAGS YFLAGS
XMKMF' XMKMF'
@@ -1501,6 +1512,8 @@ Optional Packages: @@ -1504,6 +1515,8 @@ Optional Packages:
[--with-auto-load-dir] [--with-auto-load-dir]
--without-auto-load-safe-path --without-auto-load-safe-path
do not restrict auto-loaded files locations do not restrict auto-loaded files locations
@ -753,7 +753,7 @@ Index: gdb-7.5.50.20130310/gdb/configure
--with-libunwind-ia64 use libunwind frame unwinding for ia64 targets --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
--with-curses use the curses library instead of the termcap --with-curses use the curses library instead of the termcap
library library
@@ -1545,6 +1558,13 @@ Some influential environment variables: @@ -1548,6 +1561,13 @@ Some influential environment variables:
MAKEINFO Parent configure detects if it is of sufficient version. MAKEINFO Parent configure detects if it is of sufficient version.
MAKEINFOFLAGS MAKEINFOFLAGS
Parameters for MAKEINFO. Parameters for MAKEINFO.
@ -767,7 +767,7 @@ Index: gdb-7.5.50.20130310/gdb/configure
YACC The `Yet Another C Compiler' implementation to use. Defaults to YACC The `Yet Another C Compiler' implementation to use. Defaults to
the first program found out of: `bison -y', `byacc', `yacc'. the first program found out of: `bison -y', `byacc', `yacc'.
YFLAGS The list of arguments that will be passed by default to $YACC. YFLAGS The list of arguments that will be passed by default to $YACC.
@@ -5030,6 +5050,491 @@ _ACEOF @@ -5033,6 +5053,491 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
$as_echo "$with_auto_load_safe_path" >&6; } $as_echo "$with_auto_load_safe_path" >&6; }
@ -1259,10 +1259,10 @@ Index: gdb-7.5.50.20130310/gdb/configure
subdirs="$subdirs testsuite" subdirs="$subdirs testsuite"
Index: gdb-7.5.50.20130310/gdb/configure.ac Index: gdb-7.5.91.20130407/gdb/configure.ac
=================================================================== ===================================================================
--- gdb-7.5.50.20130310.orig/gdb/configure.ac 2013-01-09 18:21:35.000000000 +0100 --- gdb-7.5.91.20130407.orig/gdb/configure.ac 2013-04-11 16:50:33.000000000 +0200
+++ gdb-7.5.50.20130310/gdb/configure.ac 2013-03-10 16:44:05.481586919 +0100 +++ gdb-7.5.91.20130407/gdb/configure.ac 2013-04-11 16:53:03.240280376 +0200
@@ -166,6 +166,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap @@ -166,6 +166,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap
[Directories safe to hold auto-loaded files.]) [Directories safe to hold auto-loaded files.])
AC_MSG_RESULT([$with_auto_load_safe_path]) AC_MSG_RESULT([$with_auto_load_safe_path])
@ -1463,10 +1463,10 @@ Index: gdb-7.5.50.20130310/gdb/configure.ac
AC_CONFIG_SUBDIRS(testsuite) AC_CONFIG_SUBDIRS(testsuite)
# Check whether to support alternative target configurations # Check whether to support alternative target configurations
Index: gdb-7.5.50.20130310/gdb/corelow.c Index: gdb-7.5.91.20130407/gdb/corelow.c
=================================================================== ===================================================================
--- gdb-7.5.50.20130310.orig/gdb/corelow.c 2013-03-10 16:36:37.000000000 +0100 --- gdb-7.5.91.20130407.orig/gdb/corelow.c 2013-04-11 16:53:00.000000000 +0200
+++ gdb-7.5.50.20130310/gdb/corelow.c 2013-03-10 16:44:05.481586919 +0100 +++ gdb-7.5.91.20130407/gdb/corelow.c 2013-04-11 16:53:03.240280376 +0200
@@ -314,7 +314,7 @@ build_id_locate_exec (int from_tty) @@ -314,7 +314,7 @@ build_id_locate_exec (int from_tty)
symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED; symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
} }

View File

@ -42,14 +42,12 @@ Subject: [PATCH 4/4] add gdb-add-index
Index: gdb-7.5.91.20130407/gdb/Makefile.in Index: gdb-7.5.91.20130407/gdb/Makefile.in
=================================================================== ===================================================================
--- gdb-7.5.91.20130407.orig/gdb/Makefile.in 2013-04-07 07:45:37.000000000 +0200 --- gdb-7.5.91.20130407.orig/gdb/Makefile.in 2013-04-11 16:52:51.000000000 +0200
+++ gdb-7.5.91.20130407/gdb/Makefile.in 2013-04-07 07:46:22.986226811 +0200 +++ gdb-7.5.91.20130407/gdb/Makefile.in 2013-04-11 16:53:59.199279388 +0200
@@ -1038,7 +1038,16 @@ install-only: install-gstack $(CONFIG_IN @@ -1053,6 +1053,15 @@ install-only: install-gstack $(CONFIG_IN
$(INSTALL_PROGRAM) gdb$(EXEEXT) \ $(INSTALL_PROGRAM) gcore \
$(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ $(DESTDIR)$(bindir)/$$transformed_name; \
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(includedir)/gdb ; \ fi
- $(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h
+ $(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h; \
+ transformed_name=`t='$(program_transform_name)'; \ + transformed_name=`t='$(program_transform_name)'; \
+ echo gdb-add-index | sed -e "$$t"` ; \ + echo gdb-add-index | sed -e "$$t"` ; \
+ if test "x$$transformed_name" = x; then \ + if test "x$$transformed_name" = x; then \
@ -64,8 +62,8 @@ Index: gdb-7.5.91.20130407/gdb/Makefile.in
install-python: install-python:
Index: gdb-7.5.91.20130407/gdb/doc/gdb.texinfo Index: gdb-7.5.91.20130407/gdb/doc/gdb.texinfo
=================================================================== ===================================================================
--- gdb-7.5.91.20130407.orig/gdb/doc/gdb.texinfo 2013-04-07 07:45:38.000000000 +0200 --- gdb-7.5.91.20130407.orig/gdb/doc/gdb.texinfo 2013-04-11 16:53:00.000000000 +0200
+++ gdb-7.5.91.20130407/gdb/doc/gdb.texinfo 2013-04-07 07:45:43.458236312 +0200 +++ gdb-7.5.91.20130407/gdb/doc/gdb.texinfo 2013-04-11 16:55:07.004278842 +0200
@@ -17159,6 +17159,14 @@ There are currently some limitation on i @@ -17159,6 +17159,14 @@ There are currently some limitation on i
for DWARF debugging information, not stabs. And, they do not for DWARF debugging information, not stabs. And, they do not
currently work for programs using Ada. currently work for programs using Ada.
@ -81,10 +79,73 @@ Index: gdb-7.5.91.20130407/gdb/doc/gdb.texinfo
@node Symbol Errors @node Symbol Errors
@section Errors Reading Symbol Files @section Errors Reading Symbol Files
@@ -41730,6 +41738,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
@@ -42382,6 +42391,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
+
+@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
@smallexample
info gdb
Index: gdb-7.5.91.20130407/gdb/gdb-add-index Index: gdb-7.5.91.20130407/gdb/gdb-add-index
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.5.91.20130407/gdb/gdb-add-index 2013-04-07 07:45:43.462236311 +0200 +++ gdb-7.5.91.20130407/gdb/gdb-add-index 2013-04-11 16:53:21.524279909 +0200
@@ -0,0 +1,30 @@ @@ -0,0 +1,30 @@
+#! /bin/sh +#! /bin/sh
+ +
@ -116,3 +177,30 @@ Index: gdb-7.5.91.20130407/gdb/gdb-add-index
+fi +fi
+ +
+exit 0 +exit 0
Index: gdb-7.5.91.20130407/gdb/doc/Makefile.in
===================================================================
--- gdb-7.5.91.20130407.orig/gdb/doc/Makefile.in 2013-04-11 16:50:33.202286928 +0200
+++ gdb-7.5.91.20130407/gdb/doc/Makefile.in 2013-04-11 16:55:06.993279304 +0200
@@ -177,7 +177,7 @@ POD2MAN5 = pod2man --center="GNU Develop
--release="gdb-`sed q $(srcdir)/../version.in`" --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)
@@ -626,6 +626,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

View File

@ -0,0 +1,690 @@
http://sourceware.org/ml/gdb-cvs/2013-04/msg00109.html
### src/gdb/ChangeLog 2013/04/11 13:14:04 1.15397
### src/gdb/ChangeLog 2013/04/11 14:13:42 1.15398
## -1,4 +1,28 @@
2013-04-11 Jan Kratochvil <jan.kratochvil@redhat.com>
+ Pedro Alves <palves@redhat.com>
+
+ * Makefile.in (HAVE_NATIVE_GCORE_TARGET): New.
+ (generated_files): Add gcore.
+ (install-only, uninstall): Add gcore if HAVE_NATIVE_GCORE_TARGET or
+ HAVE_NATIVE_GCORE_HOST.
+ (gcore): New.
+ * NEWS (Changes since GDB 7.6): Mention newly installed gcore.
+ * config/alpha/alpha-osf3.mh, config/i386/fbsd.mh,
+ config/i386/fbsd64.mh, config/i386/i386gnu.mh, config/i386/i386sol2.mh,
+ config/i386/sol2-64.mh, config/mips/irix5.mh, config/mips/irix6.mh,
+ config/powerpc/fbsd.mh, config/sparc/fbsd.mh, config/sparc/sol2.mh:
+ Add HAVE_NATIVE_GCORE_HOST.
+ * configure: Regenerate.
+ * configure.ac (HAVE_NATIVE_GCORE_TARGET): New, set it, AC_SUBST it.
+ New AC_SUBST fir GDB_TRANSFORM_NAME and GCORE_TRANSFORM_NAME. New
+ AC_CONFIG_FILES for gcore.
+ * configure.tgt: Add gdb_have_gcore to the initial comment. Set
+ gdb_have_gcore.
+ * gdb_gcore.sh: Rename to ...
+ * gcore.in: ... here. Remove gcore.sh comment. Use GDB_TRANSFORM_NAME
+ and GCORE_TRANSFORM_NAME substitutions.
+
+2013-04-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* remote.c (unpush_and_perror): Add output message final dot.
### src/gdb/doc/ChangeLog 2013/04/10 15:11:12 1.1440
### src/gdb/doc/ChangeLog 2013/04/11 14:13:44 1.1441
## -1,3 +1,13 @@
+2013-04-11 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * Makefile.in (MAN1S): Add gcore.1.
+ Remove "Host, target, and site specific Makefile fragments" comment.
+ (@host_makefile_frag@, HAVE_NATIVE_GCORE_TARGET): New.
+ (install-man1, uninstall-man1): Conditionalize gcore.1.
+ (gcore.1): New.
+ * gdb.texinfo (Man Pages): Add gcore man.
+ (gcore man): New node.
+
2013-04-10 Pedro Alves <palves@redhat.com>
* gdb.texinfo (Process Record and Replay): Document that "set
Index: gdb-7.5.91.20130407/gdb/gcore.in
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.5.91.20130407/gdb/gcore.in 2013-04-11 16:50:33.189286930 +0200
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+# Copyright (C) 2003-2013 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 <http://www.gnu.org/licenses/>.
+
+#
+# Script to generate a core file of a running program.
+# It starts up gdb, attaches to the given PID and invokes the gcore command.
+#
+
+if [ "$#" -eq "0" ]
+then
+ echo "usage: @GCORE_TRANSFORM_NAME@ [-o filename] pid"
+ exit 2
+fi
+
+# Need to check for -o option, but set default basename to "core".
+name=core
+
+if [ "$1" = "-o" ]
+then
+ if [ "$#" -lt "3" ]
+ then
+ # Not enough arguments.
+ echo "usage: @GCORE_TRANSFORM_NAME@ [-o filename] pid"
+ exit 2
+ fi
+ name=$2
+
+ # Shift over to start of pid list
+ shift; shift
+fi
+
+# Initialise return code.
+rc=0
+
+# Loop through pids
+for pid in $*
+do
+ # `</dev/null' to avoid touching interactive terminal if it is
+ # available but not accessible as GDB would get stopped on SIGTTIN.
+ @GDB_TRANSFORM_NAME@ </dev/null --nx --batch \
+ -ex "set pagination off" -ex "set height 0" -ex "set width 0" \
+ -ex "attach $pid" -ex "gcore $name.$pid" -ex detach -ex quit
+
+ if [ -r $name.$pid ] ; then
+ rc=0
+ else
+ echo "@GCORE_TRANSFORM_NAME@: failed to create $name.$pid"
+ rc=1
+ break
+ fi
+
+
+done
+
+exit $rc
Index: gdb-7.5.91.20130407/gdb/gdb_gcore.sh
===================================================================
--- gdb-7.5.91.20130407.orig/gdb/gdb_gcore.sh 2013-01-01 07:32:42.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,70 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2003-2013 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 <http://www.gnu.org/licenses/>.
-
-#
-# gcore.sh
-# Script to generate a core file of a running program.
-# It starts up gdb, attaches to the given PID and invokes the gcore command.
-#
-
-if [ "$#" -eq "0" ]
-then
- echo "usage: gcore [-o filename] pid"
- exit 2
-fi
-
-# Need to check for -o option, but set default basename to "core".
-name=core
-
-if [ "$1" = "-o" ]
-then
- if [ "$#" -lt "3" ]
- then
- # Not enough arguments.
- echo "usage: gcore [-o filename] pid"
- exit 2
- fi
- name=$2
-
- # Shift over to start of pid list
- shift; shift
-fi
-
-# Initialise return code.
-rc=0
-
-# Loop through pids
-for pid in $*
-do
- # `</dev/null' to avoid touching interactive terminal if it is
- # available but not accessible as GDB would get stopped on SIGTTIN.
- gdb </dev/null --nx --batch \
- -ex "set pagination off" -ex "set height 0" -ex "set width 0" \
- -ex "attach $pid" -ex "gcore $name.$pid" -ex detach -ex quit
-
- if [ -r $name.$pid ] ; then
- rc=0
- else
- echo gcore: failed to create $name.$pid
- rc=1
- break
- fi
-
-
-done
-
-exit $rc
Index: gdb-7.5.91.20130407/gdb/Makefile.in
===================================================================
--- gdb-7.5.91.20130407.orig/gdb/Makefile.in 2013-04-11 16:50:14.000000000 +0200
+++ gdb-7.5.91.20130407/gdb/Makefile.in 2013-04-11 16:50:33.191286929 +0200
@@ -414,6 +414,7 @@ CONFIG_ALL= @CONFIG_ALL@
CONFIG_CLEAN= @CONFIG_CLEAN@
CONFIG_INSTALL = @CONFIG_INSTALL@
CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
+HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@
# -I. for config files.
# -I$(srcdir) for gdb internal headers.
@@ -963,7 +964,7 @@ DISTSTUFF = $(YYFILES)
# All generated files which can be included by another file.
generated_files = config.h observer.h observer.inc ada-lex.c jit-reader.h \
- $(GNULIB_H) $(NAT_GENERATED_FILES)
+ $(GNULIB_H) $(NAT_GENERATED_FILES) gcore
.c.o:
$(COMPILE) $<
@@ -1039,6 +1040,19 @@ install-only: $(CONFIG_INSTALL)
$(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(includedir)/gdb ; \
$(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h
+ if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x; \
+ then \
+ transformed_name=`t='$(program_transform_name)'; \
+ echo gcore | sed -e "$$t"` ; \
+ if test "x$$transformed_name" = x; then \
+ transformed_name=gcore ; \
+ else \
+ true ; \
+ fi ; \
+ $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \
+ $(INSTALL_PROGRAM) gcore \
+ $(DESTDIR)$(bindir)/$$transformed_name; \
+ fi
@$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
install-python:
@@ -1054,6 +1068,17 @@ uninstall: force $(CONFIG_UNINSTALL)
fi ; \
rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
$(DESTDIR)$(man1dir)/$$transformed_name.1
+ if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x; \
+ then \
+ transformed_name=`t='$(program_transform_name)'; \
+ echo gcore | sed -e "$$t"` ; \
+ if test "x$$transformed_name" = x; then \
+ transformed_name=gcore ; \
+ else \
+ true ; \
+ fi ; \
+ rm -f $(DESTDIR)$(bindir)/$$transformed_name; \
+ fi
@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
# The C++ name parser can be built standalone for testing.
@@ -1298,6 +1323,9 @@ data-directory/Makefile: data-directory/
jit-reader.h: $(srcdir)/jit-reader.in
$(SHELL) config.status $@
+gcore: $(srcdir)/gcore.in
+ $(SHELL) config.status $@
+
config.h: stamp-h ; @true
stamp-h: $(srcdir)/config.in config.status
CONFIG_HEADERS=config.h:config.in \
Index: gdb-7.5.91.20130407/gdb/NEWS
===================================================================
--- gdb-7.5.91.20130407.orig/gdb/NEWS 2013-04-03 20:29:52.000000000 +0200
+++ gdb-7.5.91.20130407/gdb/NEWS 2013-04-11 16:51:06.905285030 +0200
@@ -1,6 +1,9 @@
What has changed in GDB?
(Organized release by release)
+* Newly installed $prefix/bin/gcore acts as a shell interface for the
+ GDB command gcore.
+
*** Changes since GDB 7.5
* Target record has been renamed to record-full.
Index: gdb-7.5.91.20130407/gdb/configure
===================================================================
--- gdb-7.5.91.20130407.orig/gdb/configure 2013-03-12 23:25:32.000000000 +0100
+++ gdb-7.5.91.20130407/gdb/configure 2013-04-11 16:50:50.182285829 +0200
@@ -591,6 +591,8 @@ ac_includes_default="\
enable_option_checking=no
ac_subst_vars='LTLIBOBJS
LIBOBJS
+GCORE_TRANSFORM_NAME
+GDB_TRANSFORM_NAME
GDB_NM_FILE
frags
target_subdir
@@ -681,6 +683,7 @@ AWK
REPORT_BUGS_TEXI
REPORT_BUGS_TO
PKGVERSION
+HAVE_NATIVE_GCORE_TARGET
TARGET_OBS
subdirs
GDB_DATADIR
@@ -5075,6 +5078,7 @@ fi
TARGET_OBS=
all_targets=
+HAVE_NATIVE_GCORE_TARGET=
for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
do
@@ -5109,6 +5113,12 @@ fi
if test x${want64} = xfalse; then
. ${srcdir}/../bfd/config.bfd
fi
+
+ # Check whether this target is native and supports gcore.
+ if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
+ && $gdb_have_gcore; then
+ HAVE_NATIVE_GCORE_TARGET=1
+ fi
fi
done
@@ -5171,6 +5181,7 @@ fi
+
# For other settings, only the main target counts.
gdb_sim=
gdb_osabi=
@@ -14131,6 +14142,21 @@ ac_config_links="$ac_config_links $ac_co
$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
+# Undo the $ec_script escaping suitable for Makefile.
+transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
+GDB_TRANSFORM_NAME=`echo gdb | sed -e "$transform"`
+if test "x$GDB_TRANSFORM_NAME" = x; then
+ GDB_TRANSFORM_NAME=gdb
+fi
+
+GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$transform"`
+if test "x$GCORE_TRANSFORM_NAME" = x; then
+ GCORE_TRANSFORM_NAME=gcore
+fi
+
+ac_config_files="$ac_config_files gcore"
+
+
ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
ac_config_commands="$ac_config_commands default"
@@ -14841,6 +14867,7 @@ do
"depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
"jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
"$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
+ "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
"doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
@@ -15462,6 +15489,7 @@ $as_echo "$as_me: executing $ac_file com
case $ac_file$ac_mode in
"depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
+ "gcore":F) chmod +x gcore ;;
"default":C)
case x$CONFIG_HEADERS in
xconfig.h:config.in)
Index: gdb-7.5.91.20130407/gdb/configure.ac
===================================================================
--- gdb-7.5.91.20130407.orig/gdb/configure.ac 2013-03-12 23:25:32.000000000 +0100
+++ gdb-7.5.91.20130407/gdb/configure.ac 2013-04-11 16:50:33.200286929 +0200
@@ -203,6 +203,7 @@ fi
TARGET_OBS=
all_targets=
+HAVE_NATIVE_GCORE_TARGET=
for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
do
@@ -236,6 +237,12 @@ do
if test x${want64} = xfalse; then
. ${srcdir}/../bfd/config.bfd
fi
+
+ # Check whether this target is native and supports gcore.
+ if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
+ && $gdb_have_gcore; then
+ HAVE_NATIVE_GCORE_TARGET=1
+ fi
fi
done
@@ -264,6 +271,7 @@ if test x${all_targets} = xtrue; then
fi
AC_SUBST(TARGET_OBS)
+AC_SUBST(HAVE_NATIVE_GCORE_TARGET)
# For other settings, only the main target counts.
gdb_sim=
@@ -2349,6 +2357,20 @@ dnl At the moment, we just assume it's
AC_DEFINE(GDB_DEFAULT_HOST_CHARSET, "UTF-8",
[Define to be a string naming the default host character set.])
+# Undo the $ec_script escaping suitable for Makefile.
+transform=`echo "$program_transform_name" | sed -e 's/[\\$][\\$]/\\$/g'`
+GDB_TRANSFORM_NAME=`echo gdb | sed -e "$transform"`
+if test "x$GDB_TRANSFORM_NAME" = x; then
+ GDB_TRANSFORM_NAME=gdb
+fi
+AC_SUBST(GDB_TRANSFORM_NAME)
+GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$transform"`
+if test "x$GCORE_TRANSFORM_NAME" = x; then
+ GCORE_TRANSFORM_NAME=gcore
+fi
+AC_SUBST(GCORE_TRANSFORM_NAME)
+AC_CONFIG_FILES([gcore], [chmod +x gcore])
+
AC_OUTPUT(Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile,
[
case x$CONFIG_HEADERS in
Index: gdb-7.5.91.20130407/gdb/configure.tgt
===================================================================
--- gdb-7.5.91.20130407.orig/gdb/configure.tgt 2013-03-05 14:37:10.000000000 +0100
+++ gdb-7.5.91.20130407/gdb/configure.tgt 2013-04-11 16:50:33.200286929 +0200
@@ -6,6 +6,7 @@
# gdb_sim simulator library for target
# gdb_osabi default OS ABI to use with target
# build_gdbserver set to "yes" if gdbserver supports target
+# gdb_have_gcore set to "true"/"false" if this target can run gcore
# NOTE: Every file added to a gdb_target_obs variable for any target here
# must also be added to either ALL_TARGET_OBS or ALL_64_TARGET_OBS
@@ -703,3 +704,14 @@ m68*-*-openbsd* | m88*-*-openbsd* | vax-
*-*-symbianelf*)
gdb_osabi=GDB_OSABI_SYMBIAN ;;
esac
+
+# Check whether this target supports gcore.
+# Such target has to call set_gdbarch_find_memory_regions.
+case " ${gdb_target_obs} " in
+ *" linux-tdep.o "*)
+ gdb_have_gcore=true
+ ;;
+ *)
+ gdb_have_gcore=false
+ ;;
+esac
Index: gdb-7.5.91.20130407/gdb/config/alpha/alpha-osf3.mh
===================================================================
--- gdb-7.5.91.20130407.orig/gdb/config/alpha/alpha-osf3.mh 2012-01-10 17:30:44.000000000 +0100
+++ gdb-7.5.91.20130407/gdb/config/alpha/alpha-osf3.mh 2013-04-11 16:50:33.200286929 +0200
@@ -3,4 +3,5 @@ NAT_FILE= nm-osf3.h
NATDEPFILES= alpha-nat.o fork-child.o \
solib-osf.o procfs.o proc-api.o proc-events.o proc-flags.o \
proc-why.o dec-thread.o
+HAVE_NATIVE_GCORE_HOST = 1
NAT_CLIBS= -lpthreaddebug
Index: gdb-7.5.91.20130407/gdb/config/i386/fbsd.mh
===================================================================
--- gdb-7.5.91.20130407.orig/gdb/config/i386/fbsd.mh 2009-10-26 19:28:13.000000000 +0100
+++ gdb-7.5.91.20130407/gdb/config/i386/fbsd.mh 2013-04-11 16:50:33.200286929 +0200
@@ -3,5 +3,6 @@ NATDEPFILES= fork-child.o inf-ptrace.o \
fbsd-nat.o i386-nat.o i386bsd-nat.o i386fbsd-nat.o \
bsd-kvm.o
NAT_FILE= nm-fbsd.h
+HAVE_NATIVE_GCORE_HOST = 1
LOADLIBES= -lkvm
Index: gdb-7.5.91.20130407/gdb/config/i386/fbsd64.mh
===================================================================
--- gdb-7.5.91.20130407.orig/gdb/config/i386/fbsd64.mh 2012-02-09 17:06:44.000000000 +0100
+++ gdb-7.5.91.20130407/gdb/config/i386/fbsd64.mh 2013-04-11 16:50:33.201286929 +0200
@@ -2,5 +2,6 @@
NATDEPFILES= fork-child.o inf-ptrace.o \
fbsd-nat.o amd64-nat.o amd64bsd-nat.o amd64fbsd-nat.o \
bsd-kvm.o i386-nat.o
+HAVE_NATIVE_GCORE_HOST = 1
LOADLIBES= -lkvm
Index: gdb-7.5.91.20130407/gdb/config/i386/i386gnu.mh
===================================================================
--- gdb-7.5.91.20130407.orig/gdb/config/i386/i386gnu.mh 2012-01-10 17:30:44.000000000 +0100
+++ gdb-7.5.91.20130407/gdb/config/i386/i386gnu.mh 2013-04-11 16:50:33.201286929 +0200
@@ -2,6 +2,7 @@
NATDEPFILES= i386gnu-nat.o gnu-nat.o core-regset.o fork-child.o \
notify_S.o process_reply_S.o msg_reply_S.o \
msg_U.o exc_request_U.o exc_request_S.o
+HAVE_NATIVE_GCORE_HOST = 1
NAT_FILE= nm-i386gnu.h
MH_CFLAGS = -D_GNU_SOURCE
Index: gdb-7.5.91.20130407/gdb/config/i386/i386sol2.mh
===================================================================
--- gdb-7.5.91.20130407.orig/gdb/config/i386/i386sol2.mh 2010-04-26 15:53:56.000000000 +0200
+++ gdb-7.5.91.20130407/gdb/config/i386/i386sol2.mh 2013-04-11 16:50:33.201286929 +0200
@@ -1,3 +1,4 @@
# Host: Solaris x86
NATDEPFILES= fork-child.o i386v4-nat.o i386-sol2-nat.o \
procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
+HAVE_NATIVE_GCORE_HOST = 1
Index: gdb-7.5.91.20130407/gdb/config/i386/sol2-64.mh
===================================================================
--- gdb-7.5.91.20130407.orig/gdb/config/i386/sol2-64.mh 2010-04-26 15:53:57.000000000 +0200
+++ gdb-7.5.91.20130407/gdb/config/i386/sol2-64.mh 2013-04-11 16:50:33.201286929 +0200
@@ -1,3 +1,4 @@
# Host: Solaris x86_64
NATDEPFILES= fork-child.o amd64-nat.o i386v4-nat.o i386-sol2-nat.o \
procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
+HAVE_NATIVE_GCORE_HOST = 1
Index: gdb-7.5.91.20130407/gdb/config/mips/irix5.mh
===================================================================
--- gdb-7.5.91.20130407.orig/gdb/config/mips/irix5.mh 2012-01-10 17:30:45.000000000 +0100
+++ gdb-7.5.91.20130407/gdb/config/mips/irix5.mh 2013-04-11 16:50:33.201286929 +0200
@@ -1,3 +1,4 @@
# Host: SGI Iris running irix 5.x
NATDEPFILES= fork-child.o irix5-nat.o procfs.o \
proc-api.o proc-events.o proc-flags.o proc-why.o
+HAVE_NATIVE_GCORE_HOST = 1
Index: gdb-7.5.91.20130407/gdb/config/mips/irix6.mh
===================================================================
--- gdb-7.5.91.20130407.orig/gdb/config/mips/irix6.mh 2012-01-10 17:30:45.000000000 +0100
+++ gdb-7.5.91.20130407/gdb/config/mips/irix6.mh 2013-04-11 16:50:33.201286929 +0200
@@ -1,3 +1,4 @@
# Host: SGI Iris running irix 6.x
NATDEPFILES= fork-child.o irix5-nat.o procfs.o \
proc-api.o proc-events.o proc-flags.o proc-why.o
+HAVE_NATIVE_GCORE_HOST = 1
Index: gdb-7.5.91.20130407/gdb/config/powerpc/fbsd.mh
===================================================================
--- gdb-7.5.91.20130407.orig/gdb/config/powerpc/fbsd.mh 2013-02-04 21:48:53.000000000 +0100
+++ gdb-7.5.91.20130407/gdb/config/powerpc/fbsd.mh 2013-04-11 16:50:33.202286928 +0200
@@ -18,6 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. */
NATDEPFILES= fbsd-nat.o fork-child.o inf-ptrace.o ppcfbsd-nat.o bsd-kvm.o
+HAVE_NATIVE_GCORE_HOST = 1
LOADLIBES= -lkvm
Index: gdb-7.5.91.20130407/gdb/config/sparc/fbsd.mh
===================================================================
--- gdb-7.5.91.20130407.orig/gdb/config/sparc/fbsd.mh 2009-10-26 19:28:15.000000000 +0100
+++ gdb-7.5.91.20130407/gdb/config/sparc/fbsd.mh 2013-04-11 16:50:33.202286928 +0200
@@ -2,5 +2,6 @@
NATDEPFILES= fork-child.o inf-ptrace.o \
fbsd-nat.o sparc-nat.o sparc64-nat.o sparc64fbsd-nat.o \
bsd-kvm.o
+HAVE_NATIVE_GCORE_HOST = 1
LOADLIBES= -lkvm
Index: gdb-7.5.91.20130407/gdb/config/sparc/sol2.mh
===================================================================
--- gdb-7.5.91.20130407.orig/gdb/config/sparc/sol2.mh 2012-01-10 17:30:49.000000000 +0100
+++ gdb-7.5.91.20130407/gdb/config/sparc/sol2.mh 2013-04-11 16:50:33.202286928 +0200
@@ -3,3 +3,4 @@ NAT_FILE= nm-sol2.h
NATDEPFILES= sparc-sol2-nat.o \
core-regset.o fork-child.o \
procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
+HAVE_NATIVE_GCORE_HOST = 1
Index: gdb-7.5.91.20130407/gdb/doc/Makefile.in
===================================================================
--- gdb-7.5.91.20130407.orig/gdb/doc/Makefile.in 2013-04-11 16:50:14.000000000 +0200
+++ gdb-7.5.91.20130407/gdb/doc/Makefile.in 2013-04-11 16:50:33.202286928 +0200
@@ -177,11 +177,15 @@ POD2MAN5 = pod2man --center="GNU Develop
--release="gdb-`sed q $(srcdir)/../version.in`" --section=5
# List of man pages generated from gdb.texi
-MAN1S = gdb.1 gdbserver.1
+MAN1S = gdb.1 gdbserver.1 gcore.1
MAN5S = gdbinit.5
MANS = $(MAN1S) $(MAN5S)
-#### Host, target, and site specific Makefile fragments come in here.
+# Host-dependent makefile fragment comes in here.
+@host_makefile_frag@
+# End of host-dependent makefile fragment
+HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@
+
###
all:
@@ -269,6 +273,10 @@ install-man: install-man1 install-man5
install-man1: $(MAN1S)
test -z "$(man1dir)" || $(mkinstalldirs) "$(DESTDIR)$(man1dir)"
@list='$(MAN1S)'; for p in $$list; do \
+ if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" = x \
+ -a "$$p" = gcore.1; then \
+ continue; \
+ fi; \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=`echo $$p | sed -e 's|^.*/||'`; \
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(man1dir)/$$f'"; \
@@ -288,7 +296,13 @@ uninstall-man: uninstall-man1 uninstall-
uninstall-man1:
@test -n "$(man1dir)" || exit 0; \
- files=`{ l2='$(MAN1S)'; for i in $$l2; do echo "$$i"; done | \
+ files=`{ l2='$(MAN1S)'; for i in $$l2; do \
+ if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" = x \
+ -a "$$i" = gcore.1; then \
+ continue; \
+ fi; \
+ echo "$$i"; \
+ done | \
sed -n '/\.1[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
@@ -605,6 +619,13 @@ gdbserver.1: $(GDB_DOC_FILES)
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f gdbserver.pod
+gcore.1: $(GDB_DOC_FILES)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dgcore < $(srcdir)/gdb.texinfo > gcore.pod
+ -($(POD2MAN1) gcore.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f gcore.pod
+
gdbinit.5: $(GDB_DOC_FILES)
touch $@
-$(TEXI2POD) $(MANCONF) -Dgdbinit < $(srcdir)/gdb.texinfo > gdbinit.pod
Index: gdb-7.5.91.20130407/gdb/doc/gdb.texinfo
===================================================================
--- gdb-7.5.91.20130407.orig/gdb/doc/gdb.texinfo 2013-04-11 16:50:14.000000000 +0200
+++ gdb-7.5.91.20130407/gdb/doc/gdb.texinfo 2013-04-11 16:50:33.209286928 +0200
@@ -41701,6 +41701,7 @@ switch (die->tag)
@menu
* gdb man:: The GNU Debugger man page
* gdbserver man:: Remote Server for the GNU Debugger man page
+* gcore man:: Generate a core file of a running program
* gdbinit man:: gdbinit scripts
@end menu
@@ -42222,6 +42223,53 @@ info gdb
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
+
+@node gcore man
+@heading gcore
+
+@c man title gcore Generate a core file of a running program
+
+@format
+@c man begin SYNOPSIS gcore
+gcore [-o @var{filename}] @var{pid}
+@c man end
+@end format
+
+@c man begin DESCRIPTION gcore
+Generate a core dump of a running program with process ID @var{pid}.
+Produced file is equivalent to a kernel produced core file as if the process
+crashed (and if @kbd{ulimit -c} were used to set up an appropriate core dump
+limit). Unlike after a crash, after @command{gcore} the program remains
+running without any change.
+@c man end
+
+@c man begin OPTIONS gcore
+@table @env
+@item -o @var{filename}
+The optional argument
+@var{filename} specifies the file name where to put the core dump.
+If not specified, the file name defaults to @file{core.@var{pid}},
+where @var{pid} is the running program process ID.
+@end table
+@c man end
+
+@c man begin SEEALSO gcore
+@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
+@end smallexample
+
+@noindent
+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

View File

@ -0,0 +1,33 @@
http://sourceware.org/ml/gdb-cvs/2013-04/msg00110.html
### src/gdb/ChangeLog 2013/04/11 14:13:42 1.15398
### src/gdb/ChangeLog 2013/04/11 16:53:01 1.15399
## -22,6 +22,9 @@
* gcore.in: ... here. Remove gcore.sh comment. Use GDB_TRANSFORM_NAME
and GCORE_TRANSFORM_NAME substitutions.
+ Fix parsing tabs in ${gdb_target_obs}.
+ * configure.tgt (gdb_have_gcore): Replace case with for and if.
+
2013-04-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* remote.c (unpush_and_perror): Add output message final dot.
--- src/gdb/configure.tgt 2013/04/11 14:13:43 1.273
+++ src/gdb/configure.tgt 2013/04/11 16:53:01 1.274
@@ -707,11 +707,9 @@
# Check whether this target supports gcore.
# Such target has to call set_gdbarch_find_memory_regions.
-case " ${gdb_target_obs} " in
- *" linux-tdep.o "*)
+gdb_have_gcore=false
+for t in x ${gdb_target_obs}; do
+ if test "$t" = linux-tdep.o; then
gdb_have_gcore=true
- ;;
- *)
- gdb_have_gcore=false
- ;;
-esac
+ fi
+done

View File

@ -34,7 +34,7 @@ Version: 7.5.91.%{snap}
# The release always contains a leading reserved number, start it at 1. # The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 17%{?dist} Release: 18%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
Group: Development/Debuggers Group: Development/Debuggers
@ -262,6 +262,8 @@ Patch231: gdb-6.3-bz202689-exec-from-pthread-test.patch
# Backported fixups post the source tarball. # Backported fixups post the source tarball.
#Xdrop: Just backports. #Xdrop: Just backports.
Patch232: gdb-upstream.patch Patch232: gdb-upstream.patch
Patch828: gdb-upstream-man-gcore-1of2.patch
Patch829: gdb-upstream-man-gcore-2of2.patch
# Testcase for PPC Power6/DFP instructions disassembly (BZ 230000). # Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
#=fedoratest+ppc #=fedoratest+ppc
@ -759,6 +761,8 @@ find -name "*.info*"|xargs rm -f
%patch349 -p1 %patch349 -p1
%patch232 -p1 %patch232 -p1
%patch828 -p1
%patch829 -p1
%patch1 -p1 %patch1 -p1
%patch3 -p1 %patch3 -p1
@ -1177,10 +1181,6 @@ rm -rf $RPM_BUILD_ROOT
make %{?_smp_mflags} install DESTDIR=$RPM_BUILD_ROOT make %{?_smp_mflags} install DESTDIR=$RPM_BUILD_ROOT
# install the gcore script in /usr/bin
cp $RPM_BUILD_DIR/%{gdb_src}/gdb/gdb_gcore.sh $RPM_BUILD_ROOT%{_bindir}/gcore
chmod 755 $RPM_BUILD_ROOT%{_bindir}/gcore
# Provide gdbtui for RHEL-5 and RHEL-6 as it is removed upstream (BZ 797664). # Provide gdbtui for RHEL-5 and RHEL-6 as it is removed upstream (BZ 797664).
%if 0%{?rhel:1} && 0%{?rhel} <= 6 %if 0%{?rhel:1} && 0%{?rhel} <= 6
test ! -e $RPM_BUILD_ROOT%{_prefix}/bin/gdbtui test ! -e $RPM_BUILD_ROOT%{_prefix}/bin/gdbtui
@ -1310,6 +1310,8 @@ rm -rf $RPM_BUILD_ROOT
%{_sysconfdir}/gdbinit.d %{_sysconfdir}/gdbinit.d
%{_mandir}/*/gdbinit.5* %{_mandir}/*/gdbinit.5*
%{_mandir}/*/gdb.1* %{_mandir}/*/gdb.1*
%{_mandir}/*/gcore.1*
%{_mandir}/*/gdb-add-index.1*
%{_bindir}/gstack %{_bindir}/gstack
%{_mandir}/*/gstack.1* %{_mandir}/*/gstack.1*
# Provide gdbtui for RHEL-5 and RHEL-6 as it is removed upstream (BZ 797664). # Provide gdbtui for RHEL-5 and RHEL-6 as it is removed upstream (BZ 797664).
@ -1372,6 +1374,9 @@ fi
%endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch" %endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch"
%changelog %changelog
* Thu Apr 11 2013 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.5.91.20130407-18.fc19
- Provide man page for gcore.1 and gdb-add-index.1 (BZ 881892).
* Sun Apr 7 2013 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.5.91.20130407-17.fc19 * Sun Apr 7 2013 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.5.91.20130407-17.fc19
- [RHEL-5] Fix noarch doc build. - [RHEL-5] Fix noarch doc build.