Rebase to FSF GDB 7.6.50.20130731 (pre-7.6 snapshot).
This commit is contained in:
parent
2f9bb15290
commit
872aab074e
46 changed files with 1552 additions and 13546 deletions
|
|
@ -37,10 +37,10 @@ gdb/gdbserver/
|
|||
(linux_create_inferior, linux_tracefork_child): Call it instead of
|
||||
direct ptrace.
|
||||
|
||||
Index: gdb-7.5.50.20130215/gdb/common/linux-ptrace.c
|
||||
Index: gdb-7.6.50.20130731-cvs/gdb/common/linux-ptrace.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/common/linux-ptrace.c 2013-01-08 20:38:51.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/common/linux-ptrace.c 2013-02-15 22:38:05.782456279 +0100
|
||||
--- gdb-7.6.50.20130731-cvs.orig/gdb/common/linux-ptrace.c 2013-08-02 16:33:52.767872412 +0200
|
||||
+++ gdb-7.6.50.20130731-cvs/gdb/common/linux-ptrace.c 2013-08-02 16:34:16.122910934 +0200
|
||||
@@ -29,6 +29,10 @@
|
||||
#include "gdb_assert.h"
|
||||
#include "gdb_wait.h"
|
||||
|
|
@ -61,7 +61,7 @@ Index: gdb-7.5.50.20130215/gdb/common/linux-ptrace.c
|
|||
}
|
||||
|
||||
#if defined __i386__ || defined __x86_64__
|
||||
@@ -243,3 +249,19 @@ linux_ptrace_init_warnings (void)
|
||||
@@ -236,3 +242,19 @@ linux_ptrace_init_warnings (void)
|
||||
|
||||
linux_ptrace_test_ret_to_nx ();
|
||||
}
|
||||
|
|
@ -81,10 +81,10 @@ Index: gdb-7.5.50.20130215/gdb/common/linux-ptrace.c
|
|||
+ "(gdb) shell sudo setsebool deny_ptrace=0"));
|
||||
+#endif /* HAVE_LIBSELINUX */
|
||||
+}
|
||||
Index: gdb-7.5.50.20130215/gdb/common/linux-ptrace.h
|
||||
Index: gdb-7.6.50.20130731-cvs/gdb/common/linux-ptrace.h
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/common/linux-ptrace.h 2013-01-01 07:32:54.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/common/linux-ptrace.h 2013-02-15 22:38:05.782456279 +0100
|
||||
--- gdb-7.6.50.20130731-cvs.orig/gdb/common/linux-ptrace.h 2013-08-02 16:33:52.768872414 +0200
|
||||
+++ gdb-7.6.50.20130731-cvs/gdb/common/linux-ptrace.h 2013-08-02 16:34:16.122910934 +0200
|
||||
@@ -69,5 +69,6 @@ struct buffer;
|
||||
|
||||
extern void linux_ptrace_attach_warnings (pid_t pid, struct buffer *buffer);
|
||||
|
|
@ -92,13 +92,13 @@ Index: gdb-7.5.50.20130215/gdb/common/linux-ptrace.h
|
|||
+extern void linux_ptrace_create_warnings (struct buffer *buffer);
|
||||
|
||||
#endif /* COMMON_LINUX_PTRACE_H */
|
||||
Index: gdb-7.5.50.20130215/gdb/configure.ac
|
||||
Index: gdb-7.6.50.20130731-cvs/gdb/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/configure.ac 2013-02-15 22:37:57.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/configure.ac 2013-02-15 22:38:05.783456281 +0100
|
||||
@@ -2068,6 +2068,10 @@ then
|
||||
[Define if you support the personality syscall.])
|
||||
fi
|
||||
--- gdb-7.6.50.20130731-cvs.orig/gdb/configure.ac 2013-08-02 16:34:16.123910936 +0200
|
||||
+++ gdb-7.6.50.20130731-cvs/gdb/configure.ac 2013-08-02 16:34:46.519960063 +0200
|
||||
@@ -2071,6 +2071,10 @@ case $host_os in
|
||||
esac
|
||||
AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.])
|
||||
|
||||
+dnl Check security_get_boolean_active availability.
|
||||
+AC_CHECK_HEADERS(selinux/selinux.h)
|
||||
|
|
@ -107,11 +107,11 @@ Index: gdb-7.5.50.20130215/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.5.50.20130215/gdb/gdbserver/configure.ac
|
||||
Index: gdb-7.6.50.20130731-cvs/gdb/gdbserver/configure.ac
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/gdbserver/configure.ac 2013-01-01 07:33:00.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/gdbserver/configure.ac 2013-02-15 22:38:05.783456281 +0100
|
||||
@@ -451,6 +451,10 @@ if $want_ipa ; then
|
||||
--- gdb-7.6.50.20130731-cvs.orig/gdb/gdbserver/configure.ac 2013-08-02 16:34:16.124910938 +0200
|
||||
+++ gdb-7.6.50.20130731-cvs/gdb/gdbserver/configure.ac 2013-08-02 16:35:06.634991892 +0200
|
||||
@@ -471,6 +471,10 @@ if $want_ipa ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
@ -121,12 +121,12 @@ Index: gdb-7.5.50.20130215/gdb/gdbserver/configure.ac
|
|||
+
|
||||
AC_SUBST(GDBSERVER_DEPFILES)
|
||||
AC_SUBST(GDBSERVER_LIBS)
|
||||
AC_SUBST(USE_THREAD_DB)
|
||||
Index: gdb-7.5.50.20130215/gdb/gdbserver/linux-low.c
|
||||
AC_SUBST(srv_xmlbuiltin)
|
||||
Index: gdb-7.6.50.20130731-cvs/gdb/gdbserver/linux-low.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/gdbserver/linux-low.c 2013-02-04 18:47:00.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/gdbserver/linux-low.c 2013-02-15 22:39:54.256591069 +0100
|
||||
@@ -602,6 +602,29 @@ add_lwp (ptid_t ptid)
|
||||
--- gdb-7.6.50.20130731-cvs.orig/gdb/gdbserver/linux-low.c 2013-08-02 16:33:52.772872421 +0200
|
||||
+++ gdb-7.6.50.20130731-cvs/gdb/gdbserver/linux-low.c 2013-08-02 16:34:16.126910941 +0200
|
||||
@@ -622,6 +622,29 @@ add_lwp (ptid_t ptid)
|
||||
return lwp;
|
||||
}
|
||||
|
||||
|
|
@ -156,7 +156,7 @@ Index: gdb-7.5.50.20130215/gdb/gdbserver/linux-low.c
|
|||
/* Start an inferior process and returns its pid.
|
||||
ALLARGS is a vector of program-name and args. */
|
||||
|
||||
@@ -642,7 +665,7 @@ linux_create_inferior (char *program, ch
|
||||
@@ -662,7 +685,7 @@ linux_create_inferior (char *program, ch
|
||||
|
||||
if (pid == 0)
|
||||
{
|
||||
|
|
@ -165,7 +165,7 @@ Index: gdb-7.5.50.20130215/gdb/gdbserver/linux-low.c
|
|||
|
||||
#ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does. */
|
||||
signal (__SIGRTMIN + 1, SIG_DFL);
|
||||
@@ -4587,7 +4610,7 @@ linux_tracefork_grandchild (void *arg)
|
||||
@@ -4685,7 +4708,7 @@ linux_tracefork_grandchild (void *arg)
|
||||
static int
|
||||
linux_tracefork_child (void *arg)
|
||||
{
|
||||
|
|
@ -174,10 +174,10 @@ Index: gdb-7.5.50.20130215/gdb/gdbserver/linux-low.c
|
|||
kill (getpid (), SIGSTOP);
|
||||
|
||||
#if !(defined(__UCLIBC__) && defined(HAS_NOMMU))
|
||||
Index: gdb-7.5.50.20130215/gdb/inf-ptrace.c
|
||||
Index: gdb-7.6.50.20130731-cvs/gdb/inf-ptrace.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/inf-ptrace.c 2013-01-01 07:32:45.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/inf-ptrace.c 2013-02-15 22:38:05.786456289 +0100
|
||||
--- gdb-7.6.50.20130731-cvs.orig/gdb/inf-ptrace.c 2013-08-02 16:33:52.772872421 +0200
|
||||
+++ gdb-7.6.50.20130731-cvs/gdb/inf-ptrace.c 2013-08-02 16:34:16.126910941 +0200
|
||||
@@ -104,7 +104,15 @@ static void
|
||||
inf_ptrace_me (void)
|
||||
{
|
||||
|
|
@ -194,11 +194,11 @@ Index: gdb-7.5.50.20130215/gdb/inf-ptrace.c
|
|||
}
|
||||
|
||||
/* Start a new inferior Unix child process. EXEC_FILE is the file to
|
||||
Index: gdb-7.5.50.20130215/gdb/linux-nat.c
|
||||
Index: gdb-7.6.50.20130731-cvs/gdb/linux-nat.c
|
||||
===================================================================
|
||||
--- gdb-7.5.50.20130215.orig/gdb/linux-nat.c 2013-02-15 22:34:44.000000000 +0100
|
||||
+++ gdb-7.5.50.20130215/gdb/linux-nat.c 2013-02-15 22:38:05.787456291 +0100
|
||||
@@ -1557,6 +1557,7 @@ linux_nat_create_inferior (struct target
|
||||
--- gdb-7.6.50.20130731-cvs.orig/gdb/linux-nat.c 2013-08-02 16:33:52.774872424 +0200
|
||||
+++ gdb-7.6.50.20130731-cvs/gdb/linux-nat.c 2013-08-02 16:34:16.128910944 +0200
|
||||
@@ -1554,6 +1554,7 @@ linux_nat_create_inferior (struct target
|
||||
#ifdef HAVE_PERSONALITY
|
||||
int personality_orig = 0, personality_set = 0;
|
||||
#endif /* HAVE_PERSONALITY */
|
||||
|
|
@ -206,7 +206,7 @@ Index: gdb-7.5.50.20130215/gdb/linux-nat.c
|
|||
|
||||
/* The fork_child mechanism is synchronous and calls target_wait, so
|
||||
we have to mask the async mode. */
|
||||
@@ -1581,7 +1582,10 @@ linux_nat_create_inferior (struct target
|
||||
@@ -1578,7 +1579,10 @@ linux_nat_create_inferior (struct target
|
||||
/* Make sure we report all signals during startup. */
|
||||
linux_nat_pass_signals (0, NULL);
|
||||
|
||||
|
|
@ -218,7 +218,7 @@ Index: gdb-7.5.50.20130215/gdb/linux-nat.c
|
|||
|
||||
#ifdef HAVE_PERSONALITY
|
||||
if (personality_set)
|
||||
@@ -1593,6 +1597,24 @@ linux_nat_create_inferior (struct target
|
||||
@@ -1590,6 +1594,24 @@ linux_nat_create_inferior (struct target
|
||||
safe_strerror (errno));
|
||||
}
|
||||
#endif /* HAVE_PERSONALITY */
|
||||
|
|
@ -243,3 +243,192 @@ Index: gdb-7.5.50.20130215/gdb/linux-nat.c
|
|||
}
|
||||
|
||||
static void
|
||||
Index: gdb-7.6.50.20130731-cvs/gdb/config.in
|
||||
===================================================================
|
||||
--- gdb-7.6.50.20130731-cvs.orig/gdb/config.in 2013-08-02 16:25:27.339097561 +0200
|
||||
+++ gdb-7.6.50.20130731-cvs/gdb/config.in 2013-08-02 16:36:16.249099841 +0200
|
||||
@@ -225,6 +225,9 @@
|
||||
/* Define if librpm library is being used. */
|
||||
#undef HAVE_LIBRPM
|
||||
|
||||
+/* Define to 1 if you have the `selinux' library (-lselinux). */
|
||||
+#undef HAVE_LIBSELINUX
|
||||
+
|
||||
/* Define to 1 if you have the <libunwind-ia64.h> header file. */
|
||||
#undef HAVE_LIBUNWIND_IA64_H
|
||||
|
||||
@@ -372,6 +375,9 @@
|
||||
/* Define to 1 if you have the `sbrk' function. */
|
||||
#undef HAVE_SBRK
|
||||
|
||||
+/* Define to 1 if you have the <selinux/selinux.h> header file. */
|
||||
+#undef HAVE_SELINUX_SELINUX_H
|
||||
+
|
||||
/* Define to 1 if you have the `setlocale' function. */
|
||||
#undef HAVE_SETLOCALE
|
||||
|
||||
Index: gdb-7.6.50.20130731-cvs/gdb/configure
|
||||
===================================================================
|
||||
--- gdb-7.6.50.20130731-cvs.orig/gdb/configure 2013-08-02 16:25:27.343097567 +0200
|
||||
+++ gdb-7.6.50.20130731-cvs/gdb/configure 2013-08-02 16:36:14.665097434 +0200
|
||||
@@ -12851,6 +12851,64 @@ cat >>confdefs.h <<_ACEOF
|
||||
_ACEOF
|
||||
|
||||
|
||||
+for ac_header in selinux/selinux.h
|
||||
+do :
|
||||
+ ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
|
||||
+if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then :
|
||||
+ cat >>confdefs.h <<_ACEOF
|
||||
+#define HAVE_SELINUX_SELINUX_H 1
|
||||
+_ACEOF
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+done
|
||||
+
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_get_boolean_active in -lselinux" >&5
|
||||
+$as_echo_n "checking for security_get_boolean_active in -lselinux... " >&6; }
|
||||
+if test "${ac_cv_lib_selinux_security_get_boolean_active+set}" = set; then :
|
||||
+ $as_echo_n "(cached) " >&6
|
||||
+else
|
||||
+ ac_check_lib_save_LIBS=$LIBS
|
||||
+LIBS="-lselinux $LIBS"
|
||||
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
+/* end confdefs.h. */
|
||||
+
|
||||
+/* Override any GCC internal prototype to avoid an error.
|
||||
+ Use char because int might match the return type of a GCC
|
||||
+ builtin and then its argument prototype would still apply. */
|
||||
+#ifdef __cplusplus
|
||||
+extern "C"
|
||||
+#endif
|
||||
+char security_get_boolean_active ();
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+return security_get_boolean_active ();
|
||||
+ ;
|
||||
+ return 0;
|
||||
+}
|
||||
+_ACEOF
|
||||
+if ac_fn_c_try_link "$LINENO"; then :
|
||||
+ ac_cv_lib_selinux_security_get_boolean_active=yes
|
||||
+else
|
||||
+ ac_cv_lib_selinux_security_get_boolean_active=no
|
||||
+fi
|
||||
+rm -f core conftest.err conftest.$ac_objext \
|
||||
+ conftest$ac_exeext conftest.$ac_ext
|
||||
+LIBS=$ac_check_lib_save_LIBS
|
||||
+fi
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_get_boolean_active" >&5
|
||||
+$as_echo "$ac_cv_lib_selinux_security_get_boolean_active" >&6; }
|
||||
+if test "x$ac_cv_lib_selinux_security_get_boolean_active" = x""yes; then :
|
||||
+ cat >>confdefs.h <<_ACEOF
|
||||
+#define HAVE_LIBSELINUX 1
|
||||
+_ACEOF
|
||||
+
|
||||
+ LIBS="-lselinux $LIBS"
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+
|
||||
|
||||
# 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.50.20130731-cvs/gdb/gdbserver/config.in
|
||||
===================================================================
|
||||
--- gdb-7.6.50.20130731-cvs.orig/gdb/gdbserver/config.in 2013-07-31 21:41:54.000000000 +0200
|
||||
+++ gdb-7.6.50.20130731-cvs/gdb/gdbserver/config.in 2013-08-02 16:36:21.719108141 +0200
|
||||
@@ -76,6 +76,12 @@
|
||||
/* Define to 1 if you have the `dl' library (-ldl). */
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
+/* Define to 1 if you have the `mcheck' library (-lmcheck). */
|
||||
+#undef HAVE_LIBMCHECK
|
||||
+
|
||||
+/* Define to 1 if you have the `selinux' library (-lselinux). */
|
||||
+#undef HAVE_LIBSELINUX
|
||||
+
|
||||
/* Define if the target supports branch tracing. */
|
||||
#undef HAVE_LINUX_BTRACE
|
||||
|
||||
@@ -146,6 +152,9 @@
|
||||
/* Define to 1 if you have the `readlink' function. */
|
||||
#undef HAVE_READLINK
|
||||
|
||||
+/* Define to 1 if you have the <selinux/selinux.h> header file. */
|
||||
+#undef HAVE_SELINUX_SELINUX_H
|
||||
+
|
||||
/* Define to 1 if you have the <sgtty.h> header file. */
|
||||
#undef HAVE_SGTTY_H
|
||||
|
||||
Index: gdb-7.6.50.20130731-cvs/gdb/gdbserver/configure
|
||||
===================================================================
|
||||
--- gdb-7.6.50.20130731-cvs.orig/gdb/gdbserver/configure 2013-07-31 21:41:54.000000000 +0200
|
||||
+++ gdb-7.6.50.20130731-cvs/gdb/gdbserver/configure 2013-08-02 16:36:20.237105894 +0200
|
||||
@@ -6003,6 +6003,64 @@ if $want_ipa ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
+for ac_header in selinux/selinux.h
|
||||
+do :
|
||||
+ ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
|
||||
+if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then :
|
||||
+ cat >>confdefs.h <<_ACEOF
|
||||
+#define HAVE_SELINUX_SELINUX_H 1
|
||||
+_ACEOF
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+done
|
||||
+
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_get_boolean_active in -lselinux" >&5
|
||||
+$as_echo_n "checking for security_get_boolean_active in -lselinux... " >&6; }
|
||||
+if test "${ac_cv_lib_selinux_security_get_boolean_active+set}" = set; then :
|
||||
+ $as_echo_n "(cached) " >&6
|
||||
+else
|
||||
+ ac_check_lib_save_LIBS=$LIBS
|
||||
+LIBS="-lselinux $LIBS"
|
||||
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
+/* end confdefs.h. */
|
||||
+
|
||||
+/* Override any GCC internal prototype to avoid an error.
|
||||
+ Use char because int might match the return type of a GCC
|
||||
+ builtin and then its argument prototype would still apply. */
|
||||
+#ifdef __cplusplus
|
||||
+extern "C"
|
||||
+#endif
|
||||
+char security_get_boolean_active ();
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+return security_get_boolean_active ();
|
||||
+ ;
|
||||
+ return 0;
|
||||
+}
|
||||
+_ACEOF
|
||||
+if ac_fn_c_try_link "$LINENO"; then :
|
||||
+ ac_cv_lib_selinux_security_get_boolean_active=yes
|
||||
+else
|
||||
+ ac_cv_lib_selinux_security_get_boolean_active=no
|
||||
+fi
|
||||
+rm -f core conftest.err conftest.$ac_objext \
|
||||
+ conftest$ac_exeext conftest.$ac_ext
|
||||
+LIBS=$ac_check_lib_save_LIBS
|
||||
+fi
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_get_boolean_active" >&5
|
||||
+$as_echo "$ac_cv_lib_selinux_security_get_boolean_active" >&6; }
|
||||
+if test "x$ac_cv_lib_selinux_security_get_boolean_active" = x""yes; then :
|
||||
+ cat >>confdefs.h <<_ACEOF
|
||||
+#define HAVE_LIBSELINUX 1
|
||||
+_ACEOF
|
||||
+
|
||||
+ LIBS="-lselinux $LIBS"
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue