Rebase to FSF GDB 7.7.90.20140613 (pre-7.8 snapshot).

This commit is contained in:
Jan Kratochvil 2014-06-19 22:14:32 +02:00
commit eb6cb2db36
72 changed files with 10262 additions and 14239 deletions

View file

@ -37,10 +37,10 @@ gdb/gdbserver/
(linux_create_inferior, linux_tracefork_child): Call it instead of
direct ptrace.
Index: gdb-7.6.90.20140127/gdb/common/linux-ptrace.c
Index: gdb-7.7.50.20140609/gdb/common/linux-ptrace.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/common/linux-ptrace.c 2014-02-06 17:40:32.530145960 +0100
+++ gdb-7.6.90.20140127/gdb/common/linux-ptrace.c 2014-02-06 17:48:16.329644534 +0100
--- gdb-7.7.50.20140609.orig/gdb/common/linux-ptrace.c 2014-06-13 20:28:04.375884828 +0200
+++ gdb-7.7.50.20140609/gdb/common/linux-ptrace.c 2014-06-13 20:28:57.514940079 +0200
@@ -32,6 +32,10 @@
#include <stdint.h>
@ -52,16 +52,16 @@ Index: gdb-7.6.90.20140127/gdb/common/linux-ptrace.c
/* Stores the currently supported ptrace options. A value of
-1 means we did not check for features yet. A value of 0 means
there are no supported features. */
@@ -56,6 +60,8 @@ linux_ptrace_attach_warnings (pid_t pid,
buffer_xml_printf (buffer, _("warning: process %d is a zombie "
"- the process has already terminated\n"),
@@ -56,6 +60,8 @@ linux_ptrace_attach_fail_reason (pid_t p
buffer_xml_printf (buffer, _("process %d is a zombie "
"- the process has already terminated"),
(int) pid);
+
+ linux_ptrace_create_warnings (buffer);
}
#if defined __i386__ || defined __x86_64__
@@ -542,3 +548,19 @@ linux_ptrace_init_warnings (void)
@@ -551,3 +557,19 @@ linux_ptrace_init_warnings (void)
linux_ptrace_test_ret_to_nx ();
}
@ -81,23 +81,23 @@ Index: gdb-7.6.90.20140127/gdb/common/linux-ptrace.c
+ "(gdb) shell sudo setsebool deny_ptrace=0"));
+#endif /* HAVE_LIBSELINUX */
+}
Index: gdb-7.6.90.20140127/gdb/common/linux-ptrace.h
Index: gdb-7.7.50.20140609/gdb/common/linux-ptrace.h
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/common/linux-ptrace.h 2014-02-06 17:40:35.506149162 +0100
+++ gdb-7.6.90.20140127/gdb/common/linux-ptrace.h 2014-02-06 17:48:00.601627995 +0100
--- gdb-7.7.50.20140609.orig/gdb/common/linux-ptrace.h 2014-06-13 20:28:14.375895202 +0200
+++ gdb-7.7.50.20140609/gdb/common/linux-ptrace.h 2014-06-13 20:28:33.298914047 +0200
@@ -85,6 +85,7 @@ struct buffer;
extern void linux_ptrace_attach_warnings (pid_t pid, struct buffer *buffer);
extern void linux_ptrace_attach_fail_reason (pid_t pid, struct buffer *buffer);
extern void linux_ptrace_init_warnings (void);
+extern void linux_ptrace_create_warnings (struct buffer *buffer);
extern void linux_enable_event_reporting (pid_t pid);
extern void linux_disable_event_reporting (pid_t pid);
extern int linux_supports_tracefork (void);
extern int linux_supports_traceclone (void);
Index: gdb-7.6.90.20140127/gdb/configure.ac
Index: gdb-7.7.50.20140609/gdb/configure.ac
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/configure.ac 2014-02-06 17:40:32.532145962 +0100
+++ gdb-7.6.90.20140127/gdb/configure.ac 2014-02-06 17:40:35.507149163 +0100
@@ -1975,6 +1975,10 @@ case $host_os in
--- gdb-7.7.50.20140609.orig/gdb/configure.ac 2014-06-13 20:28:04.377884830 +0200
+++ gdb-7.7.50.20140609/gdb/configure.ac 2014-06-13 20:28:14.376895203 +0200
@@ -2138,6 +2138,10 @@ case $host_os in
esac
AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.])
@ -108,10 +108,10 @@ Index: gdb-7.6.90.20140127/gdb/configure.ac
dnl Handle optional features that can be enabled.
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
Index: gdb-7.6.90.20140127/gdb/gdbserver/configure.ac
Index: gdb-7.7.50.20140609/gdb/gdbserver/configure.ac
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/gdbserver/configure.ac 2014-02-06 17:40:32.532145962 +0100
+++ gdb-7.6.90.20140127/gdb/gdbserver/configure.ac 2014-02-06 17:40:35.507149163 +0100
--- gdb-7.7.50.20140609.orig/gdb/gdbserver/configure.ac 2014-06-13 20:28:04.377884830 +0200
+++ gdb-7.7.50.20140609/gdb/gdbserver/configure.ac 2014-06-13 20:28:14.376895203 +0200
@@ -454,6 +454,10 @@ if $want_ipa ; then
fi
fi
@ -123,11 +123,11 @@ Index: gdb-7.6.90.20140127/gdb/gdbserver/configure.ac
AC_SUBST(GDBSERVER_DEPFILES)
AC_SUBST(GDBSERVER_LIBS)
AC_SUBST(srv_xmlbuiltin)
Index: gdb-7.6.90.20140127/gdb/gdbserver/linux-low.c
Index: gdb-7.7.50.20140609/gdb/gdbserver/linux-low.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/gdbserver/linux-low.c 2014-02-06 17:40:32.534145964 +0100
+++ gdb-7.6.90.20140127/gdb/gdbserver/linux-low.c 2014-02-06 17:49:32.385726514 +0100
@@ -543,6 +543,29 @@ add_lwp (ptid_t ptid)
--- gdb-7.7.50.20140609.orig/gdb/gdbserver/linux-low.c 2014-06-13 20:28:04.379884832 +0200
+++ gdb-7.7.50.20140609/gdb/gdbserver/linux-low.c 2014-06-13 20:28:14.377895204 +0200
@@ -541,6 +541,29 @@ add_lwp (ptid_t ptid)
return lwp;
}
@ -157,7 +157,7 @@ Index: gdb-7.6.90.20140127/gdb/gdbserver/linux-low.c
/* Start an inferior process and returns its pid.
ALLARGS is a vector of program-name and args. */
@@ -584,7 +607,7 @@ linux_create_inferior (char *program, ch
@@ -582,7 +605,7 @@ linux_create_inferior (char *program, ch
if (pid == 0)
{
close_most_fds ();
@ -166,10 +166,10 @@ Index: gdb-7.6.90.20140127/gdb/gdbserver/linux-low.c
#ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does. */
signal (__SIGRTMIN + 1, SIG_DFL);
Index: gdb-7.6.90.20140127/gdb/inf-ptrace.c
Index: gdb-7.7.50.20140609/gdb/inf-ptrace.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/inf-ptrace.c 2014-02-06 17:40:32.535145965 +0100
+++ gdb-7.6.90.20140127/gdb/inf-ptrace.c 2014-02-06 17:40:35.510149167 +0100
--- gdb-7.7.50.20140609.orig/gdb/inf-ptrace.c 2014-06-13 20:28:04.380884833 +0200
+++ gdb-7.7.50.20140609/gdb/inf-ptrace.c 2014-06-13 20:28:14.377895204 +0200
@@ -105,7 +105,15 @@ static void
inf_ptrace_me (void)
{
@ -186,11 +186,11 @@ Index: gdb-7.6.90.20140127/gdb/inf-ptrace.c
}
/* Start a new inferior Unix child process. EXEC_FILE is the file to
Index: gdb-7.6.90.20140127/gdb/linux-nat.c
Index: gdb-7.7.50.20140609/gdb/linux-nat.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/linux-nat.c 2014-02-06 17:40:32.537145968 +0100
+++ gdb-7.6.90.20140127/gdb/linux-nat.c 2014-02-06 17:40:35.511149168 +0100
@@ -1283,6 +1283,7 @@ linux_nat_create_inferior (struct target
--- gdb-7.7.50.20140609.orig/gdb/linux-nat.c 2014-06-13 20:28:04.382884835 +0200
+++ gdb-7.7.50.20140609/gdb/linux-nat.c 2014-06-13 20:29:34.554977995 +0200
@@ -1285,6 +1285,7 @@ linux_nat_create_inferior (struct target
#ifdef HAVE_PERSONALITY
int personality_orig = 0, personality_set = 0;
#endif /* HAVE_PERSONALITY */
@ -198,9 +198,9 @@ Index: gdb-7.6.90.20140127/gdb/linux-nat.c
/* The fork_child mechanism is synchronous and calls target_wait, so
we have to mask the async mode. */
@@ -1307,7 +1308,10 @@ linux_nat_create_inferior (struct target
@@ -1309,7 +1310,10 @@ linux_nat_create_inferior (struct target
/* Make sure we report all signals during startup. */
linux_nat_pass_signals (0, NULL);
linux_nat_pass_signals (ops, 0, NULL);
- linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
+ TRY_CATCH (ex, RETURN_MASK_ERROR)
@ -210,7 +210,7 @@ Index: gdb-7.6.90.20140127/gdb/linux-nat.c
#ifdef HAVE_PERSONALITY
if (personality_set)
@@ -1319,6 +1323,24 @@ linux_nat_create_inferior (struct target
@@ -1321,6 +1325,24 @@ linux_nat_create_inferior (struct target
safe_strerror (errno));
}
#endif /* HAVE_PERSONALITY */
@ -235,11 +235,11 @@ Index: gdb-7.6.90.20140127/gdb/linux-nat.c
}
static void
Index: gdb-7.6.90.20140127/gdb/config.in
Index: gdb-7.7.50.20140609/gdb/config.in
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/config.in 2014-02-06 17:40:32.538145969 +0100
+++ gdb-7.6.90.20140127/gdb/config.in 2014-02-06 17:40:35.511149168 +0100
@@ -213,6 +213,9 @@
--- gdb-7.7.50.20140609.orig/gdb/config.in 2014-06-13 20:28:04.383884836 +0200
+++ gdb-7.7.50.20140609/gdb/config.in 2014-06-13 20:29:57.378002067 +0200
@@ -216,6 +216,9 @@
/* Define if librpm library is being used. */
#undef HAVE_LIBRPM
@ -249,9 +249,9 @@ Index: gdb-7.6.90.20140127/gdb/config.in
/* Define to 1 if you have the <libunwind-ia64.h> header file. */
#undef HAVE_LIBUNWIND_IA64_H
@@ -345,6 +348,9 @@
/* Define to 1 if you have the `sbrk' function. */
#undef HAVE_SBRK
@@ -351,6 +354,9 @@
/* Define to 1 if you have the `scm_new_smob' function. */
#undef HAVE_SCM_NEW_SMOB
+/* Define to 1 if you have the <selinux/selinux.h> header file. */
+#undef HAVE_SELINUX_SELINUX_H
@ -259,11 +259,11 @@ Index: gdb-7.6.90.20140127/gdb/config.in
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
Index: gdb-7.6.90.20140127/gdb/configure
Index: gdb-7.7.50.20140609/gdb/configure
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/configure 2014-02-06 17:40:32.541145972 +0100
+++ gdb-7.6.90.20140127/gdb/configure 2014-02-06 17:40:35.515149172 +0100
@@ -12861,6 +12861,64 @@ cat >>confdefs.h <<_ACEOF
--- gdb-7.7.50.20140609.orig/gdb/configure 2014-06-13 20:28:04.387884840 +0200
+++ gdb-7.7.50.20140609/gdb/configure 2014-06-13 20:28:14.383895210 +0200
@@ -13282,6 +13282,64 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
@ -328,11 +328,11 @@ Index: gdb-7.6.90.20140127/gdb/configure
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
# except that the argument to --with-sysroot is optional.
Index: gdb-7.6.90.20140127/gdb/gdbserver/config.in
Index: gdb-7.7.50.20140609/gdb/gdbserver/config.in
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/gdbserver/config.in 2014-02-06 17:40:32.542145973 +0100
+++ gdb-7.6.90.20140127/gdb/gdbserver/config.in 2014-02-06 17:54:06.923021799 +0100
@@ -78,6 +78,9 @@
--- gdb-7.7.50.20140609.orig/gdb/gdbserver/config.in 2014-06-13 20:28:04.389884842 +0200
+++ gdb-7.7.50.20140609/gdb/gdbserver/config.in 2014-06-13 20:28:14.383895210 +0200
@@ -81,6 +81,9 @@
/* Define to 1 if you have the `mcheck' library (-lmcheck). */
#undef HAVE_LIBMCHECK
@ -342,7 +342,7 @@ Index: gdb-7.6.90.20140127/gdb/gdbserver/config.in
/* Define if the target supports branch tracing. */
#undef HAVE_LINUX_BTRACE
@@ -151,6 +154,9 @@
@@ -154,6 +157,9 @@
/* Define to 1 if you have the `readlink' function. */
#undef HAVE_READLINK
@ -352,10 +352,10 @@ Index: gdb-7.6.90.20140127/gdb/gdbserver/config.in
/* Define to 1 if you have the <sgtty.h> header file. */
#undef HAVE_SGTTY_H
Index: gdb-7.6.90.20140127/gdb/gdbserver/configure
Index: gdb-7.7.50.20140609/gdb/gdbserver/configure
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/gdbserver/configure 2014-02-06 17:40:32.543145974 +0100
+++ gdb-7.6.90.20140127/gdb/gdbserver/configure 2014-02-06 17:40:35.516149173 +0100
--- gdb-7.7.50.20140609.orig/gdb/gdbserver/configure 2014-06-13 20:28:04.390884844 +0200
+++ gdb-7.7.50.20140609/gdb/gdbserver/configure 2014-06-13 20:28:14.384895211 +0200
@@ -6170,6 +6170,64 @@ if $want_ipa ; then
fi
fi