From 2116e53327da0f5a3df28573d96be339cb83006d Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Fri, 8 Jan 2016 22:19:09 +0100 Subject: [PATCH] Rebase to FSF GDB 7.10.50.20160106 (trunk snapshot). --- .gitignore | 2 +- gdb-6.3-test-pie-20050107.patch | 62 +- gdb-attach-fail-reasons-5of5.patch | 94 +- gdb-fork-plus-threads-ascending-revert.patch | 945 +++++++++++++++++++ gdb-rhbz795424-bitpos-23of25.patch | 414 ++++---- gdb-test-bt-cfi-without-die.patch | 18 +- gdb-testsuite-foll-vfork.patch | 128 +++ gdb-testsuite-funcargs-m32.patch | 88 ++ gdb-testsuite-multi-base-warnings.patch | 141 +++ gdb-vla-intel.patch | 214 ++--- gdb.spec | 23 +- sources | 2 +- 12 files changed, 1726 insertions(+), 405 deletions(-) create mode 100644 gdb-fork-plus-threads-ascending-revert.patch create mode 100644 gdb-testsuite-foll-vfork.patch create mode 100644 gdb-testsuite-funcargs-m32.patch create mode 100644 gdb-testsuite-multi-base-warnings.patch diff --git a/.gitignore b/.gitignore index 522a14d..f911cb2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ /gdb-libstdc++-v3-python-r225521.tar.xz -/gdb-7.10.50.20151113.tar.xz +/gdb-7.10.50.20160106.tar.xz diff --git a/gdb-6.3-test-pie-20050107.patch b/gdb-6.3-test-pie-20050107.patch index 9b72ff8..db3271b 100644 --- a/gdb-6.3-test-pie-20050107.patch +++ b/gdb-6.3-test-pie-20050107.patch @@ -1,19 +1,19 @@ -Index: gdb-7.9.50.20150520/gdb/testsuite/configure.ac +Index: gdb-7.10.50.20160106/gdb/testsuite/configure.ac =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/testsuite/configure.ac 2015-05-31 16:34:02.396969450 +0200 -+++ gdb-7.9.50.20150520/gdb/testsuite/configure.ac 2015-05-31 16:34:33.443196711 +0200 -@@ -114,5 +114,5 @@ AC_OUTPUT([Makefile \ +--- gdb-7.10.50.20160106.orig/gdb/testsuite/configure.ac 2016-01-06 02:48:37.000000000 +0100 ++++ gdb-7.10.50.20160106/gdb/testsuite/configure.ac 2016-01-08 19:57:23.747571543 +0100 +@@ -112,5 +112,5 @@ gdb.guile/Makefile gdb.linespec/Makefile \ gdb.mi/Makefile gdb.modula2/Makefile gdb.multi/Makefile \ gdb.objc/Makefile gdb.opencl/Makefile gdb.opt/Makefile gdb.pascal/Makefile \ - gdb.perf/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \ + gdb.perf/Makefile gdb.pie/Makefile gdb.python/Makefile gdb.reverse/Makefile gdb.stabs/Makefile \ gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile]) -Index: gdb-7.9.50.20150520/gdb/testsuite/configure +Index: gdb-7.10.50.20160106/gdb/testsuite/configure =================================================================== ---- gdb-7.9.50.20150520.orig/gdb/testsuite/configure 2015-05-31 16:33:53.154901798 +0200 -+++ gdb-7.9.50.20150520/gdb/testsuite/configure 2015-05-31 16:34:48.654308057 +0200 -@@ -3514,7 +3514,7 @@ program_transform_name=`$as_echo "$progr +--- gdb-7.10.50.20160106.orig/gdb/testsuite/configure 2016-01-06 02:48:37.000000000 +0100 ++++ gdb-7.10.50.20160106/gdb/testsuite/configure 2016-01-08 19:57:23.748571549 +0100 +@@ -3512,7 +3512,7 @@ ac_config_files="$ac_config_files lib/pdtrace" @@ -22,7 +22,7 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/configure cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure -@@ -4242,6 +4242,7 @@ do +@@ -4240,6 +4240,7 @@ "gdb.opt/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.opt/Makefile" ;; "gdb.pascal/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.pascal/Makefile" ;; "gdb.perf/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.perf/Makefile" ;; @@ -30,10 +30,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/configure "gdb.python/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.python/Makefile" ;; "gdb.reverse/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.reverse/Makefile" ;; "gdb.stabs/Makefile") CONFIG_FILES="$CONFIG_FILES gdb.stabs/Makefile" ;; -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.c +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.pie/attach.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.c 2015-05-31 16:34:02.398969465 +0200 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.pie/attach.c 2016-01-08 19:57:23.748571549 +0100 @@ -0,0 +1,20 @@ +/* This program is intended to be started outside of gdb, and then + attached to by gdb. Thus, it simply spins in a loop. The loop @@ -55,10 +55,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.c + } + return 0; +} -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach2.c +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.pie/attach2.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach2.c 2015-05-31 16:34:02.398969465 +0200 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.pie/attach2.c 2016-01-08 19:57:23.748571549 +0100 @@ -0,0 +1,24 @@ +/* This program is intended to be started outside of gdb, and then + attached to by gdb. Thus, it simply spins in a loop. The loop @@ -84,10 +84,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach2.c + } + return (0); +} -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.c +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.pie/break.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.c 2015-05-31 16:34:02.399969472 +0200 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.pie/break.c 2016-01-08 19:57:23.748571549 +0100 @@ -0,0 +1,146 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -235,10 +235,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.c + } + return 0; +} -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break1.c +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.pie/break1.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break1.c 2015-05-31 16:34:02.399969472 +0200 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.pie/break1.c 2016-01-08 19:57:23.749571554 +0100 @@ -0,0 +1,44 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -284,10 +284,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break1.c +void marker3 (a, b) char *a, *b; {} /* set breakpoint 18 here */ +void marker4 (d) long d; {} /* set breakpoint 13 here */ +#endif -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/coremaker.c +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.pie/coremaker.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/coremaker.c 2015-05-31 16:34:02.399969472 +0200 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.pie/coremaker.c 2016-01-08 19:57:23.749571554 +0100 @@ -0,0 +1,142 @@ +/* Copyright 1992, 1993, 1994, 1995, 1996, 1999 + Free Software Foundation, Inc. @@ -431,10 +431,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/coremaker.c + return 0; +} + -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.exp +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.pie/attach.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.exp 2015-05-31 16:34:02.400969480 +0200 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.pie/attach.exp 2016-01-08 19:57:23.749571554 +0100 @@ -0,0 +1,417 @@ +# Copyright 1997, 1999, 2002 Free Software Foundation, Inc. + @@ -853,11 +853,11 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/attach.exp +do_call_attach_tests + +return 0 -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.exp +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.pie/break.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.exp 2015-05-31 16:34:02.401969487 +0200 -@@ -0,0 +1,962 @@ ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.pie/break.exp 2016-01-08 19:58:00.877778395 +0100 +@@ -0,0 +1,958 @@ +# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2002, 2003, 2004 +# Free Software Foundation, Inc. @@ -1018,11 +1018,7 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.exp + set main_line $bp_location6 +} + -+if {$hp_aCC_compiler} { -+ set proto "\\(int\\)" -+} else { -+ set proto "" -+} ++set proto "" + +set bp_location7 [gdb_get_line_number "set breakpoint 7 here"] +set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1] @@ -1820,10 +1816,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/break.exp + send_gdb "set args main\n" + gdb_expect -re ".*$gdb_prompt $" {} +} -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/corefile.exp +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.pie/corefile.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/corefile.exp 2015-05-31 16:34:02.401969487 +0200 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.pie/corefile.exp 2016-01-08 19:57:23.750571560 +0100 @@ -0,0 +1,233 @@ +# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 +# Free Software Foundation, Inc. @@ -2058,10 +2054,10 @@ Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/corefile.exp +gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp (reinit)" + +gdb_test "core" "No core file now." -Index: gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/Makefile.in +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.pie/Makefile.in =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.9.50.20150520/gdb/testsuite/gdb.pie/Makefile.in 2015-05-31 16:34:02.401969487 +0200 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.pie/Makefile.in 2016-01-08 19:57:23.750571560 +0100 @@ -0,0 +1,19 @@ +VPATH = @srcdir@ +srcdir = @srcdir@ diff --git a/gdb-attach-fail-reasons-5of5.patch b/gdb-attach-fail-reasons-5of5.patch index 1fb970a..48d7ab4 100644 --- a/gdb-attach-fail-reasons-5of5.patch +++ b/gdb-attach-fail-reasons-5of5.patch @@ -37,10 +37,10 @@ gdb/gdbserver/ (linux_create_inferior, linux_tracefork_child): Call it instead of direct ptrace. -Index: gdb-7.10.50.20151113/gdb/nat/linux-ptrace.c +Index: gdb-7.10.50.20160106/gdb/nat/linux-ptrace.c =================================================================== ---- gdb-7.10.50.20151113.orig/gdb/nat/linux-ptrace.c 2015-11-13 02:48:40.000000000 +0100 -+++ gdb-7.10.50.20151113/gdb/nat/linux-ptrace.c 2015-11-14 16:11:22.902121970 +0100 +--- gdb-7.10.50.20160106.orig/gdb/nat/linux-ptrace.c 2016-01-08 19:15:57.580707944 +0100 ++++ gdb-7.10.50.20160106/gdb/nat/linux-ptrace.c 2016-01-08 19:16:02.654736246 +0100 @@ -24,6 +24,10 @@ #include "gdb_wait.h" #include "gdb_ptrace.h" @@ -52,7 +52,7 @@ Index: gdb-7.10.50.20151113/gdb/nat/linux-ptrace.c /* Stores the ptrace options supported by the running kernel. A value of -1 means we did not check for features yet. A value of 0 means there are no supported features. */ -@@ -48,6 +52,8 @@ linux_ptrace_attach_fail_reason (pid_t p +@@ -48,6 +52,8 @@ buffer_xml_printf (buffer, _("process %d is a zombie " "- the process has already terminated"), (int) pid); @@ -61,7 +61,7 @@ Index: gdb-7.10.50.20151113/gdb/nat/linux-ptrace.c } /* See linux-ptrace.h. */ -@@ -594,6 +600,22 @@ linux_ptrace_init_warnings (void) +@@ -594,6 +600,22 @@ linux_ptrace_test_ret_to_nx (); } @@ -84,11 +84,11 @@ Index: gdb-7.10.50.20151113/gdb/nat/linux-ptrace.c /* Extract extended ptrace event from wait status. */ int -Index: gdb-7.10.50.20151113/gdb/nat/linux-ptrace.h +Index: gdb-7.10.50.20160106/gdb/nat/linux-ptrace.h =================================================================== ---- gdb-7.10.50.20151113.orig/gdb/nat/linux-ptrace.h 2015-11-13 02:48:40.000000000 +0100 -+++ gdb-7.10.50.20151113/gdb/nat/linux-ptrace.h 2015-11-14 16:11:22.902121970 +0100 -@@ -164,6 +164,7 @@ extern void linux_ptrace_attach_fail_rea +--- gdb-7.10.50.20160106.orig/gdb/nat/linux-ptrace.h 2016-01-08 19:15:57.581707950 +0100 ++++ gdb-7.10.50.20160106/gdb/nat/linux-ptrace.h 2016-01-08 19:16:02.655736251 +0100 +@@ -164,6 +164,7 @@ extern char *linux_ptrace_attach_fail_reason_string (ptid_t ptid, int err); extern void linux_ptrace_init_warnings (void); @@ -96,11 +96,11 @@ Index: gdb-7.10.50.20151113/gdb/nat/linux-ptrace.h extern void linux_check_ptrace_features (void); extern void linux_enable_event_reporting (pid_t pid, int attached); extern void linux_disable_event_reporting (pid_t pid); -Index: gdb-7.10.50.20151113/gdb/configure.ac +Index: gdb-7.10.50.20160106/gdb/configure.ac =================================================================== ---- gdb-7.10.50.20151113.orig/gdb/configure.ac 2015-11-14 16:11:22.610120168 +0100 -+++ gdb-7.10.50.20151113/gdb/configure.ac 2015-11-14 16:11:22.902121970 +0100 -@@ -2096,6 +2096,10 @@ case $host_os in +--- gdb-7.10.50.20160106.orig/gdb/configure.ac 2016-01-08 19:15:57.582707955 +0100 ++++ gdb-7.10.50.20160106/gdb/configure.ac 2016-01-08 19:16:02.656736257 +0100 +@@ -2077,6 +2077,10 @@ esac AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.]) @@ -111,11 +111,11 @@ Index: gdb-7.10.50.20151113/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.10.50.20151113/gdb/gdbserver/configure.ac +Index: gdb-7.10.50.20160106/gdb/gdbserver/configure.ac =================================================================== ---- gdb-7.10.50.20151113.orig/gdb/gdbserver/configure.ac 2015-11-13 02:48:40.000000000 +0100 -+++ gdb-7.10.50.20151113/gdb/gdbserver/configure.ac 2015-11-14 16:11:22.903121976 +0100 -@@ -502,6 +502,10 @@ if $want_ipa ; then +--- gdb-7.10.50.20160106.orig/gdb/gdbserver/configure.ac 2016-01-08 19:15:57.582707955 +0100 ++++ gdb-7.10.50.20160106/gdb/gdbserver/configure.ac 2016-01-08 19:16:02.656736257 +0100 +@@ -524,6 +524,10 @@ fi fi @@ -126,11 +126,11 @@ Index: gdb-7.10.50.20151113/gdb/gdbserver/configure.ac AC_SUBST(GDBSERVER_DEPFILES) AC_SUBST(GDBSERVER_LIBS) AC_SUBST(srv_xmlbuiltin) -Index: gdb-7.10.50.20151113/gdb/gdbserver/linux-low.c +Index: gdb-7.10.50.20160106/gdb/gdbserver/linux-low.c =================================================================== ---- gdb-7.10.50.20151113.orig/gdb/gdbserver/linux-low.c 2015-11-13 02:48:40.000000000 +0100 -+++ gdb-7.10.50.20151113/gdb/gdbserver/linux-low.c 2015-11-14 16:11:22.904121982 +0100 -@@ -833,6 +833,29 @@ add_lwp (ptid_t ptid) +--- gdb-7.10.50.20160106.orig/gdb/gdbserver/linux-low.c 2016-01-08 19:15:57.585707972 +0100 ++++ gdb-7.10.50.20160106/gdb/gdbserver/linux-low.c 2016-01-08 19:16:02.658736268 +0100 +@@ -853,6 +853,29 @@ return lwp; } @@ -160,20 +160,20 @@ Index: gdb-7.10.50.20151113/gdb/gdbserver/linux-low.c /* Start an inferior process and returns its pid. ALLARGS is a vector of program-name and args. */ -@@ -856,7 +879,7 @@ linux_create_inferior (char *program, ch +@@ -876,7 +899,7 @@ if (pid == 0) { close_most_fds (); - ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0); + linux_traceme (program); - #ifndef __ANDROID__ /* Bionic doesn't use SIGRTMIN the way glibc does. */ - signal (__SIGRTMIN + 1, SIG_DFL); -Index: gdb-7.10.50.20151113/gdb/inf-ptrace.c + setpgid (0, 0); + +Index: gdb-7.10.50.20160106/gdb/inf-ptrace.c =================================================================== ---- gdb-7.10.50.20151113.orig/gdb/inf-ptrace.c 2015-11-13 02:48:40.000000000 +0100 -+++ gdb-7.10.50.20151113/gdb/inf-ptrace.c 2015-11-14 16:11:22.904121982 +0100 -@@ -79,7 +79,15 @@ static void +--- gdb-7.10.50.20160106.orig/gdb/inf-ptrace.c 2016-01-08 19:15:57.586707977 +0100 ++++ gdb-7.10.50.20160106/gdb/inf-ptrace.c 2016-01-08 19:16:02.659736274 +0100 +@@ -79,7 +79,15 @@ inf_ptrace_me (void) { /* "Trace me, Dr. Memory!" */ @@ -189,11 +189,11 @@ Index: gdb-7.10.50.20151113/gdb/inf-ptrace.c } /* Start a new inferior Unix child process. EXEC_FILE is the file to -Index: gdb-7.10.50.20151113/gdb/linux-nat.c +Index: gdb-7.10.50.20160106/gdb/linux-nat.c =================================================================== ---- gdb-7.10.50.20151113.orig/gdb/linux-nat.c 2015-11-13 02:48:40.000000000 +0100 -+++ gdb-7.10.50.20151113/gdb/linux-nat.c 2015-11-14 16:11:22.905121988 +0100 -@@ -1184,6 +1184,7 @@ linux_nat_create_inferior (struct target +--- gdb-7.10.50.20160106.orig/gdb/linux-nat.c 2016-01-08 19:15:57.587707983 +0100 ++++ gdb-7.10.50.20160106/gdb/linux-nat.c 2016-01-08 19:16:02.660736279 +0100 +@@ -1016,6 +1016,7 @@ { struct cleanup *restore_personality = maybe_disable_address_space_randomization (disable_randomization); @@ -201,7 +201,7 @@ Index: gdb-7.10.50.20151113/gdb/linux-nat.c /* The fork_child mechanism is synchronous and calls target_wait, so we have to mask the async mode. */ -@@ -1191,7 +1192,28 @@ linux_nat_create_inferior (struct target +@@ -1023,7 +1024,28 @@ /* Make sure we report all signals during startup. */ linux_nat_pass_signals (ops, 0, NULL); @@ -231,10 +231,10 @@ Index: gdb-7.10.50.20151113/gdb/linux-nat.c do_cleanups (restore_personality); } -Index: gdb-7.10.50.20151113/gdb/config.in +Index: gdb-7.10.50.20160106/gdb/config.in =================================================================== ---- gdb-7.10.50.20151113.orig/gdb/config.in 2015-11-14 16:11:22.607120150 +0100 -+++ gdb-7.10.50.20151113/gdb/config.in 2015-11-14 16:11:22.905121988 +0100 +--- gdb-7.10.50.20160106.orig/gdb/config.in 2016-01-08 19:15:57.588707989 +0100 ++++ gdb-7.10.50.20160106/gdb/config.in 2016-01-08 19:16:02.660736279 +0100 @@ -264,6 +264,9 @@ /* Define if librpm library is being used. */ #undef HAVE_LIBRPM @@ -255,11 +255,11 @@ Index: gdb-7.10.50.20151113/gdb/config.in /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE -Index: gdb-7.10.50.20151113/gdb/configure +Index: gdb-7.10.50.20160106/gdb/configure =================================================================== ---- gdb-7.10.50.20151113.orig/gdb/configure 2015-11-14 16:11:22.610120168 +0100 -+++ gdb-7.10.50.20151113/gdb/configure 2015-11-14 16:11:22.907122001 +0100 -@@ -14694,6 +14694,64 @@ cat >>confdefs.h <<_ACEOF +--- gdb-7.10.50.20160106.orig/gdb/configure 2016-01-08 19:15:57.593708017 +0100 ++++ gdb-7.10.50.20160106/gdb/configure 2016-01-08 19:16:02.665736307 +0100 +@@ -14653,6 +14653,64 @@ _ACEOF @@ -324,10 +324,10 @@ Index: gdb-7.10.50.20151113/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.10.50.20151113/gdb/gdbserver/config.in +Index: gdb-7.10.50.20160106/gdb/gdbserver/config.in =================================================================== ---- gdb-7.10.50.20151113.orig/gdb/gdbserver/config.in 2015-11-13 02:48:40.000000000 +0100 -+++ gdb-7.10.50.20151113/gdb/gdbserver/config.in 2015-11-14 16:13:15.974819541 +0100 +--- gdb-7.10.50.20160106.orig/gdb/gdbserver/config.in 2016-01-08 19:15:57.595708028 +0100 ++++ gdb-7.10.50.20160106/gdb/gdbserver/config.in 2016-01-08 19:16:02.665736307 +0100 @@ -117,6 +117,9 @@ /* Define to 1 if you have the `mcheck' library (-lmcheck). */ #undef HAVE_LIBMCHECK @@ -348,11 +348,11 @@ Index: gdb-7.10.50.20151113/gdb/gdbserver/config.in /* Define to 1 if you have the `setns' function. */ #undef HAVE_SETNS -Index: gdb-7.10.50.20151113/gdb/gdbserver/configure +Index: gdb-7.10.50.20160106/gdb/gdbserver/configure =================================================================== ---- gdb-7.10.50.20151113.orig/gdb/gdbserver/configure 2015-11-13 02:48:40.000000000 +0100 -+++ gdb-7.10.50.20151113/gdb/gdbserver/configure 2015-11-14 16:13:14.866812706 +0100 -@@ -7290,6 +7290,64 @@ if $want_ipa ; then +--- gdb-7.10.50.20160106.orig/gdb/gdbserver/configure 2016-01-08 19:15:57.597708039 +0100 ++++ gdb-7.10.50.20160106/gdb/gdbserver/configure 2016-01-08 19:16:02.667736318 +0100 +@@ -7311,6 +7311,64 @@ fi fi diff --git a/gdb-fork-plus-threads-ascending-revert.patch b/gdb-fork-plus-threads-ascending-revert.patch new file mode 100644 index 0000000..3258bf4 --- /dev/null +++ b/gdb-fork-plus-threads-ascending-revert.patch @@ -0,0 +1,945 @@ +http://sourceware.org/ml/gdb-patches/2016-01/msg00141.html +Subject: Regression for gdb.threads/fork-plus-threads.exp [Re: [PATCH 3/6] List inferiors/threads/pspaces in ascending order] + +On Thu, 22 Oct 2015 11:59:01 +0200, Pedro Alves wrote: + +7e0aa6aa9983c745aedc203db0cc360a0ad47cac is the first bad commit +commit 7e0aa6aa9983c745aedc203db0cc360a0ad47cac +Author: Pedro Alves +Date: Tue Nov 24 18:11:21 2015 +0000 + List inferiors/threads/pspaces in ascending order + +PASS->FAIL: +FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: inferior 1 exited +FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: no threads left (timeout) +FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: only inferior 1 left (the program exited) + +-PASS: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: inferior 1 exited ++warning: Error removing breakpoint 1^M ++Error in re-setting breakpoint 1: Warning:^M ++Cannot insert breakpoint 1.^M ++Cannot access memory at address 0x8048700^M ++^M ++Warning:^M ++Cannot insert breakpoint 1.^M ++Cannot access memory at address 0x8048700^M ++^M ++(gdb) FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: inferior 1 exited + +I haven't tried to debug it. + +It happens on Fedora 23 x86_64 with -m32 for the testsuite. + + +Jan + +REVERT: + +commit 7e0aa6aa9983c745aedc203db0cc360a0ad47cac +Author: Pedro Alves +Date: Tue Nov 24 18:11:21 2015 +0000 + + List inferiors/threads/pspaces in ascending order + + Before: + (gdb) info threads + Id Target Id Frame + 3 Thread 0x7ffff77c3700 (LWP 29035) callme () at foo.c:30 + 2 Thread 0x7ffff7fc4700 (LWP 29034) 0x000000000040087b in child_function_2 (arg=0x0) at foo.c:60 + * 1 Thread 0x7ffff7fc5740 (LWP 29030) 0x0000003b37209237 in pthread_join (threadid=140737353893632, thread_return=0x0) at pthread_join.c:92 + + After: + (gdb) info threads + Id Target Id Frame + * 1 Thread 0x7ffff7fc5740 (LWP 29030) 0x0000003b37209237 in pthread_join (threadid=140737353893632, thread_return=0x0) at pthread_join.c:92 + 2 Thread 0x7ffff7fc4700 (LWP 29034) 0x000000000040087b in child_function_2 (arg=0x0) at foo.c:60 + 3 Thread 0x7ffff77c3700 (LWP 29035) callme () at foo.c:30 + + gdb/doc/ChangeLog: + 2015-11-24 Pedro Alves + + PR 17539 + * gdb.texinfo (Inferiors and Programs): Adjust "maint info + program-spaces" example to ascending order listing. + (Threads): Adjust "info threads" example to ascending order + listing. + (Forks): Adjust "info inferiors" example to ascending order + listing. + + gdb/ChangeLog: + 2015-11-24 Pedro Alves + + PR 17539 + * inferior.c (add_inferior_silent): Append the new inferior to the + end of the list. + * progspace.c (add_program_space): Append the new pspace to the + end of the list. + * thread.c (new_thread): Append the new thread to the end of the + list. + + gdb/testsuite/ChangeLog: + 2015-11-24 Pedro Alves + + PR 17539 + * gdb.base/foll-exec-mode.exp: Adjust to GDB listing inferiors and + threads in ascending order. + * gdb.base/foll-fork.exp: Likewise. + * gdb.base/foll-vfork.exp: Likewise. + * gdb.base/multi-forks.exp: Likewise. + * gdb.mi/mi-nonstop.exp: Likewise. + * gdb.mi/mi-nsintrall.exp: Likewise. + * gdb.multi/base.exp: Likewise. + * gdb.multi/multi-arch.exp: Likewise. + * gdb.python/py-inferior.exp: Likewise. + * gdb.threads/break-while-running.exp: Likewise. + * gdb.threads/execl.exp: Likewise. + * gdb.threads/gcore-thread.exp: Likewise. + * gdb.threads/info-threads-cur-sal.exp: Likewise. + * gdb.threads/kill.exp: Likewise. + * gdb.threads/linux-dp.exp: Likewise. + * gdb.threads/multiple-step-overs.exp: Likewise. + * gdb.threads/next-bp-other-thread.exp: Likewise. + * gdb.threads/step-bg-decr-pc-switch-thread.exp: Likewise. + * gdb.threads/step-over-lands-on-breakpoint.exp: Likewise. + * gdb.threads/step-over-trips-on-watchpoint.exp: Likewise. + * gdb.threads/thread-find.exp: Likewise. + * gdb.threads/tls.exp: Likewise. + * lib/mi-support.exp (mi_reverse_list): Delete. + (mi_check_thread_states): No longer reverse list. + +diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo +index 0778383..fe9481d 100644 +--- a/gdb/doc/gdb.texinfo ++++ b/gdb/doc/gdb.texinfo +@@ -2791,9 +2791,9 @@ example, the list of inferiors bound to the program space. + @smallexample + (@value{GDBP}) maint info program-spaces + Id Executable +-* 1 hello + 2 goodbye + Bound inferiors: ID 1 (process 21561) ++* 1 hello + @end smallexample + + Here we can see that no inferior is running the program @code{hello}, +@@ -2924,9 +2924,9 @@ For example, + @smallexample + (@value{GDBP}) info threads + Id Target Id Frame +-* 1 process 35 thread 13 main (argc=1, argv=0x7ffffff8) +- 2 process 35 thread 23 0x34e5 in sigpause () + 3 process 35 thread 27 0x34e5 in sigpause () ++ 2 process 35 thread 23 0x34e5 in sigpause () ++* 1 process 35 thread 13 main (argc=1, argv=0x7ffffff8) + at threadtest.c:68 + @end smallexample + +@@ -3241,8 +3241,8 @@ process 12020 is executing new program: prog2 + Program exited normally. + (@value{GDBP}) info inferiors + Id Description Executable +- 1 prog1 + * 2 prog2 ++ 1 prog1 + @end smallexample + + @item same +diff --git a/gdb/inferior.c b/gdb/inferior.c +index e71104d..515268f 100644 +--- a/gdb/inferior.c ++++ b/gdb/inferior.c +@@ -135,17 +135,8 @@ add_inferior_silent (int pid) + inf->control.stop_soon = NO_STOP_QUIETLY; + + inf->num = ++highest_inferior_num; +- +- if (inferior_list == NULL) +- inferior_list = inf; +- else +- { +- struct inferior *last; +- +- for (last = inferior_list; last->next != NULL; last = last->next) +- ; +- last->next = inf; +- } ++ inf->next = inferior_list; ++ inferior_list = inf; + + inf->environment = make_environ (); + init_environ (inf->environment); +diff --git a/gdb/progspace.c b/gdb/progspace.c +index 59a7846..9a622ed 100644 +--- a/gdb/progspace.c ++++ b/gdb/progspace.c +@@ -133,16 +133,8 @@ add_program_space (struct address_space *aspace) + + program_space_alloc_data (pspace); + +- if (program_spaces == NULL) +- program_spaces = pspace; +- else +- { +- struct program_space *last; +- +- for (last = program_spaces; last->next != NULL; last = last->next) +- ; +- last->next = pspace; +- } ++ pspace->next = program_spaces; ++ program_spaces = pspace; + + return pspace; + } +diff --git a/gdb/testsuite/gdb.base/foll-exec-mode.exp b/gdb/testsuite/gdb.base/foll-exec-mode.exp +index 41d788b..ad23cb5 100644 +--- a/gdb/testsuite/gdb.base/foll-exec-mode.exp ++++ b/gdb/testsuite/gdb.base/foll-exec-mode.exp +@@ -150,7 +150,7 @@ proc do_follow_exec_mode_tests { mode cmd infswitch } { + if {$mode == "same"} { + set expected_re "\\* 1.*process.*" + } else { +- set expected_re " 1.*null.*$testfile.*\r\n\\* 2.*process.*$testfile2 .*" ++ set expected_re "\\* 2.*process.*$testfile2 \r\n 1.*null.*$testfile.*" + } + + # Check that the inferior list is correct: +diff --git a/gdb/testsuite/gdb.base/foll-fork.exp b/gdb/testsuite/gdb.base/foll-fork.exp +index 61aefc1..bd1df14 100644 +--- a/gdb/testsuite/gdb.base/foll-fork.exp ++++ b/gdb/testsuite/gdb.base/foll-fork.exp +@@ -139,7 +139,7 @@ proc test_follow_fork { who detach cmd } { + + # Follow parent / keep child: two inferiors under debug, the + # parent is the current inferior. +- gdb_test "info inferiors" "\\* 1 .*process.* 2 .*process.*" \ ++ gdb_test "info inferiors" " 2 .*process.*\\* 1 .*process.*" \ + "info inferiors" + + gdb_test "inferior 2" "Switching to inferior 2 .*" +@@ -150,14 +150,14 @@ proc test_follow_fork { who detach cmd } { + # Follow child / detach parent: the child is under debug and is + # the current inferior. The parent is listed but is not under + # debug. +- gdb_test "info inferiors" " 1 .*.*\\* 2 .*process.*" \ ++ gdb_test "info inferiors" "\\* 2 .*process.* 1 .*.*" \ + "info inferiors" + + } elseif {$who == "child" && $detach == "off"} { + + # Follow child / keep parent: two inferiors under debug, the + # child is the current inferior. +- gdb_test "info inferiors" " 1 .*process.*\\* 2 .*process.*" \ ++ gdb_test "info inferiors" "\\* 2 .*process.* 1 .*process.*" \ + "info inferiors" + + gdb_test "inferior 1" "Switching to inferior 1 .*" +diff --git a/gdb/testsuite/gdb.base/foll-vfork.exp b/gdb/testsuite/gdb.base/foll-vfork.exp +index efa1b39..ed25487 100644 +--- a/gdb/testsuite/gdb.base/foll-vfork.exp ++++ b/gdb/testsuite/gdb.base/foll-vfork.exp +@@ -330,7 +330,7 @@ proc vfork_relations_in_info_inferiors { variant } { + } + + gdb_test "info inferiors" \ +- ".*is vfork parent of inferior 2.*is vfork child of inferior 1" \ ++ ".*is vfork child of inferior 1.*is vfork parent of inferior 2" \ + "info inferiors shows vfork parent/child relation" + + if { $variant == "exec" } { +diff --git a/gdb/testsuite/gdb.base/multi-forks.exp b/gdb/testsuite/gdb.base/multi-forks.exp +index 1eaaa71..2f3dd86 100644 +--- a/gdb/testsuite/gdb.base/multi-forks.exp ++++ b/gdb/testsuite/gdb.base/multi-forks.exp +@@ -150,13 +150,13 @@ gdb_test_no_output "set detach off" "set detach off" + + for {set i 1} {$i <= 15} {incr i} { + gdb_test "continue" "Breakpoint .* main .*exit.*" "Run to exit $i" +- gdb_test "info inferior" " 2 .* 3 .* 4 .* 5 .*" "info inferior $i" ++ gdb_test "info inferior" " 5 .* 4 .* 3 .* 2 .*" "info inferior $i" + gdb_test "inferior $i + 1" "(_dl_sysinfo_int80|fork|__kernel_(v|)syscall).*" \ + "inferior $i" + } + + gdb_test "continue" "Breakpoint .* main .*exit.*" "Run to exit 16" +-gdb_test "info inferior" " 2 .* 3 .* 4 .* 5 .*" "info inferior 16" ++gdb_test "info inferiors" " 5 .* 4 .* 3 .* 2 .*" "info inferior 16" + gdb_test "inferior 2" " main .*" "restart final" + + # +@@ -177,9 +177,27 @@ gdb_test "detach inferior 5" "Detaching .*" "Detach 5" + # Test kill inferior + # + +-for {set i 6} { $i <= 16} {incr i} { +- gdb_test_no_output "kill inferior $i" "Kill $i" +- gdb_test "info inferior $i" ".*" "Did kill $i" +-} ++gdb_test_no_output "kill inferior 6" "Kill 6" ++gdb_test "info inferior 6" ".*" "Did kill 6" ++gdb_test_no_output "kill inferior 7" "Kill 7" ++gdb_test "info inferior 7" ".*" "Did kill 7" ++gdb_test_no_output "kill inferior 8" "Kill 8" ++gdb_test "info inferior 8" ".*" "Did kill 8" ++gdb_test_no_output "kill inferior 9" "Kill 9" ++gdb_test "info inferior 9" ".*" "Did kill 9" ++gdb_test_no_output "kill inferior 10" "Kill 10" ++gdb_test "info inferior 10" ".*" "Did kill 10" ++gdb_test_no_output "kill inferior 11" "Kill 11" ++gdb_test "info inferior 11" ".*" "Did kill 11" ++gdb_test_no_output "kill inferior 12" "Kill 12" ++gdb_test "info inferior 12" ".*" "Did kill 12" ++gdb_test_no_output "kill inferior 13" "Kill 13" ++gdb_test "info inferior 13" ".*" "Did kill 13" ++gdb_test_no_output "kill inferior 14" "Kill 14" ++gdb_test "info inferior 14" ".*" "Did kill 14" ++gdb_test_no_output "kill inferior 15" "Kill 15" ++gdb_test "info inferior 15" ".*" "Did kill 15" ++gdb_test_no_output "kill inferior 16" "Kill 16" ++gdb_test "info inferior 16" ".*" "Did kill 16" + + return 0 +diff --git a/gdb/testsuite/gdb.mi/mi-nonstop.exp b/gdb/testsuite/gdb.mi/mi-nonstop.exp +index 5e11f8d..cad9901 100644 +--- a/gdb/testsuite/gdb.mi/mi-nonstop.exp ++++ b/gdb/testsuite/gdb.mi/mi-nonstop.exp +@@ -97,7 +97,7 @@ mi_expect_interrupt "got interrupt" + sleep 1 + mi_check_thread_states {"stopped" "stopped" "stopped"} "thread state, stop 4" + +-mi_gdb_test "-exec-continue --all" ".*\\*running,thread-id=\"1\"\r\n\\*running,thread-id=\"2\"\r\n\\*running,thread-id=\"3\"" \ ++mi_gdb_test "-exec-continue --all" ".*\\*running,thread-id=\"3\"\r\n\\*running,thread-id=\"2\"\r\n\\*running,thread-id=\"1\"" \ + "resume all" + + mi_expect_stop "breakpoint-hit" "break_at_me" "\[^\n\]*" "non-stop.c" "\[0-9\]*" {"" "disp=\"keep\""} "w0,i2 stop" +diff --git a/gdb/testsuite/gdb.mi/mi-nsintrall.exp b/gdb/testsuite/gdb.mi/mi-nsintrall.exp +index 378c729..061a6f3 100644 +--- a/gdb/testsuite/gdb.mi/mi-nsintrall.exp ++++ b/gdb/testsuite/gdb.mi/mi-nsintrall.exp +@@ -67,10 +67,10 @@ mi_delete_breakpoints + # Here we create a response string. Note we don't want \r\n at the end, + # since mi_gdb_test will append this itself. + set running_re "" +-for {set i 1} {$i < 6} {incr i} { ++for {set i 6} {$i > 1} {incr i -1} { + set running_re "$running_re\\*running,thread-id=\"$i\"\r\n" + } +-set running_re "$running_re\\*running,thread-id=\"6\"" ++set running_re "$running_re\\*running,thread-id=\"1\"" + + mi_gdb_test "-exec-continue --all" "\[^\n\]*\r\n$running_re" \ + "resume all, no breakpoint" +diff --git a/gdb/testsuite/gdb.multi/base.exp b/gdb/testsuite/gdb.multi/base.exp +index 6f0bc63..e02f95f 100644 +--- a/gdb/testsuite/gdb.multi/base.exp ++++ b/gdb/testsuite/gdb.multi/base.exp +@@ -59,7 +59,7 @@ gdb_test "add-inferior -exec ${binfile3}" \ + # Check that we have multiple inferiors. + + gdb_test "info inferiors" \ +- "Executable.*${exec1}.*${exec2}.*${exec3}.*" ++ "Executable.*${exec3}.*${exec2}.*${exec1}.*" + + # Test info inferiors with args + +@@ -68,16 +68,16 @@ set see2 0 + set see3 0 + + gdb_test_multiple "info inferior 2 3" "info inferior 2 3" { +- -re ". 1 \[^\r\n\]*${exec1}" { +- set see1 1 ++ -re ". 3 \[^\r\n\]*${exec3}" { ++ set see3 1 + exp_continue + } + -re ". 2 \[^\r\n\]*${exec2}" { + set see2 1 + exp_continue + } +- -re ". 3 \[^\r\n\]*${exec3}" { +- set see3 1 ++ -re ". 1 \[^\r\n\]*${exec1}" { ++ set see1 1 + exp_continue + } + -re "$gdb_prompt $" { +@@ -94,16 +94,16 @@ set see2 0 + set see3 0 + + gdb_test_multiple "info inferior 1-2" "info inferior 1-2" { +- -re ". 1 \[^\r\n\]*${exec1}" { +- set see1 1 ++ -re ". 3 \[^\r\n\]*${exec3}" { ++ set see3 1 + exp_continue + } + -re ". 2 \[^\r\n\]*${exec2}" { + set see2 1 + exp_continue + } +- -re ". 3 \[^\r\n\]*${exec3}" { +- set see3 1 ++ -re ". 1 \[^\r\n\]*${exec1}" { ++ set see1 1 + exp_continue + } + -re "$gdb_prompt $" { +diff --git a/gdb/testsuite/gdb.multi/multi-arch.exp b/gdb/testsuite/gdb.multi/multi-arch.exp +index b114a2f..5922d70 100644 +--- a/gdb/testsuite/gdb.multi/multi-arch.exp ++++ b/gdb/testsuite/gdb.multi/multi-arch.exp +@@ -95,4 +95,4 @@ if ![runto_main] then { + # Check we do have two inferiors loaded. + + gdb_test "info inferiors" \ +- "Executable.*${exec1}.*${exec2}.*" ++ "Executable.*${exec2}.*${exec1}.*" +diff --git a/gdb/testsuite/gdb.python/py-inferior.exp b/gdb/testsuite/gdb.python/py-inferior.exp +index 9b90d0b..7e6f91d 100644 +--- a/gdb/testsuite/gdb.python/py-inferior.exp ++++ b/gdb/testsuite/gdb.python/py-inferior.exp +@@ -230,10 +230,10 @@ with_test_prefix "is_valid" { + "check inferior validity 3" + + gdb_test_no_output "remove-inferiors 2" "remove-inferiors 3" +- gdb_test "python print (inf_list\[0\].is_valid())" "True" \ ++ gdb_test "python print (inf_list\[0\].is_valid())" "False" \ + "check inferior validity 4" + +- gdb_test "python print (inf_list\[1\].is_valid())" "False" \ ++ gdb_test "python print (inf_list\[1\].is_valid())" "True" \ + "check inferior validity 5" + } + +diff --git a/gdb/testsuite/gdb.threads/break-while-running.exp b/gdb/testsuite/gdb.threads/break-while-running.exp +index 8a197e4..05860bc 100644 +--- a/gdb/testsuite/gdb.threads/break-while-running.exp ++++ b/gdb/testsuite/gdb.threads/break-while-running.exp +@@ -78,7 +78,7 @@ proc test { update_thread_list always_inserted non_stop } { + # without the user explicitly fetching the thread list. + if {$update_thread_list} { + gdb_test "info threads" \ +- "main .*\\\(running\\\).*\\\(running\\\).*" \ ++ "\\\(running\\\).*\\\(running\\\).* main .*" \ + "only main stopped" + } + +@@ -107,7 +107,7 @@ proc test { update_thread_list always_inserted non_stop } { + + if {$non_stop == "on"} { + gdb_test "info threads" \ +- "main .* breakpoint_function .*\\\(running\\\)" \ ++ "\\\(running\\\).* breakpoint_function .* main .*" \ + "one thread running" + + # Unblock the other thread, which should then trip on the same +@@ -131,7 +131,7 @@ proc test { update_thread_list always_inserted non_stop } { + } + + gdb_test "info threads" \ +- " main .* breakpoint_function .* breakpoint_function .*" \ ++ " breakpoint_function .* breakpoint_function .* main .*" \ + "all threads stopped" + } else { + # This test is not merged with the non-stop one because in +@@ -142,7 +142,7 @@ proc test { update_thread_list always_inserted non_stop } { + -re "\\\(running\\\).*$gdb_prompt $" { + fail $test + } +- -re "main .* breakpoint_function .*$gdb_prompt $" { ++ -re "breakpoint_function .* main .*$gdb_prompt $" { + pass $test + } + } +diff --git a/gdb/testsuite/gdb.threads/execl.exp b/gdb/testsuite/gdb.threads/execl.exp +index 8538fd7..14e3e68 100644 +--- a/gdb/testsuite/gdb.threads/execl.exp ++++ b/gdb/testsuite/gdb.threads/execl.exp +@@ -40,7 +40,7 @@ gdb_test "b [gdb_get_line_number "breakpoint here"]" \ + + gdb_test "continue" ".*breakpoint here.*" "continue to exec" + +-gdb_test "info threads" "1 *Thread.*2 *Thread.*3 *Thread.*" "info threads before exec" ++gdb_test "info threads" ".*3 *Thread.*2 *Thread.*1 *Thread.*" "info threads before exec" + + # When continuing from this point we'll hit the breakpoint in main() + # again, this time in the exec'd process. +diff --git a/gdb/testsuite/gdb.threads/gcore-thread.exp b/gdb/testsuite/gdb.threads/gcore-thread.exp +index f74f147..44fb347 100644 +--- a/gdb/testsuite/gdb.threads/gcore-thread.exp ++++ b/gdb/testsuite/gdb.threads/gcore-thread.exp +@@ -127,7 +127,7 @@ foreach name { corefile core0file } { with_test_prefix $name { + # mapping various OS's may do? Let's assume that there must + # be at least two threads: + +- gdb_test "info threads" "\\* 1 ${horiz}${nl} 2 ${horiz}.*" \ ++ gdb_test "info threads" ".*${nl} 2 ${horiz}${nl}\\* 1 .*" \ + "corefile contains at least two threads" + + # One thread in the corefile should be in the "thread2" function. +@@ -137,6 +137,6 @@ foreach name { corefile core0file } { with_test_prefix $name { + + # The thread2 thread should be marked as the current thread. + +- gdb_test "info threads" "\\* ${horiz} thread2 .*${nl}" \ ++ gdb_test "info threads" ".*${nl}\\* ${horiz} thread2 .*" \ + "thread2 is current thread in corefile" + }} +diff --git a/gdb/testsuite/gdb.threads/info-threads-cur-sal.exp b/gdb/testsuite/gdb.threads/info-threads-cur-sal.exp +index 23a3c36..603d944 100644 +--- a/gdb/testsuite/gdb.threads/info-threads-cur-sal.exp ++++ b/gdb/testsuite/gdb.threads/info-threads-cur-sal.exp +@@ -41,20 +41,14 @@ gdb_test "list $line" \ + # There used to be a bug where "info threads" would set the current + # SAL to the location of the last thread displayed. + gdb_test "info threads" \ +- [multi_line \ +- "\[ \t\]*Id\[ \t\]+Target\[ \t\]+Id\[ \t\]+Frame\[ \t\]*" \ +- " 1 *Thread \[^\r\n\]* .* \[^\r\n\]*" \ +- "\\* 2 *Thread \[^\r\n\]* at \[^\r\n\]*"] \ ++ "\r\n\[ \t\]*Id\[ \t\]+Target\[ \t\]+Id\[ \t\]+Frame\[ \t\]*\r\n\\* 2 *Thread \[^\r\n\]* at \[^\r\n\]*\r\n 1 *Thread \[^\r\n\]* .* \[^\r\n\]*" \ + "info threads before break" + + # Check that "break" is still operating on the same file by default. + gdb_test "break $line" ".*${srcfile2}.*" "break on line" + + gdb_test "info threads" \ +- [multi_line \ +- "\[ \t\]*Id\[ \t\]+Target\[ \t\]+Id\[ \t\]+Frame\[ \t\]*" \ +- " 1 *Thread \[^\r\n\]* .* \[^\r\n\]*" \ +- "\\* 2 *Thread \[^\r\n\]* at \[^\r\n\]*"] \ ++ "\r\n\[ \t\]*Id\[ \t\]+Target\[ \t\]+Id\[ \t\]+Frame\[ \t\]*\r\n\\* 2 *Thread \[^\r\n\]* at \[^\r\n\]*\r\n 1 *Thread \[^\r\n\]* .* \[^\r\n\]*" \ + "info threads before list" + + # And that so is "list". +diff --git a/gdb/testsuite/gdb.threads/kill.exp b/gdb/testsuite/gdb.threads/kill.exp +index a6d8382..741ebd5 100644 +--- a/gdb/testsuite/gdb.threads/kill.exp ++++ b/gdb/testsuite/gdb.threads/kill.exp +@@ -48,7 +48,7 @@ proc test {threaded} { + gdb_continue_to_breakpoint "break here" ".*break here.*" + + if {$threaded} { +- gdb_test "info threads" "1.*2.*3.*4.*5.*6.*" "all threads started" ++ gdb_test "info threads" "6.*5.*4.*3.*2.*1.*" "all threads started" + } + + # This kills and ensures no output other than the prompt comes out, +diff --git a/gdb/testsuite/gdb.threads/linux-dp.exp b/gdb/testsuite/gdb.threads/linux-dp.exp +index 6365f7d..7b5c706 100644 +--- a/gdb/testsuite/gdb.threads/linux-dp.exp ++++ b/gdb/testsuite/gdb.threads/linux-dp.exp +@@ -168,7 +168,7 @@ set nthreads 6 + gdb_breakpoint [gdb_get_line_number "linuxthreads.exp: info threads 2"] + gdb_continue_to_breakpoint "main thread's sleep" + set info_threads_ptn ".*" +-for {set i 1} {$i < $nthreads} {incr i} { ++for {set i $nthreads} {$i > 0} {incr i -1} { + append info_threads_ptn "$i *Thread .*" + } + append info_threads_ptn "\[\r\n\]+$gdb_prompt $" +diff --git a/gdb/testsuite/gdb.threads/multiple-step-overs.exp b/gdb/testsuite/gdb.threads/multiple-step-overs.exp +index cf7728b..6a38192 100644 +--- a/gdb/testsuite/gdb.threads/multiple-step-overs.exp ++++ b/gdb/testsuite/gdb.threads/multiple-step-overs.exp +@@ -46,7 +46,7 @@ proc setup {} { + + gdb_breakpoint [gdb_get_line_number "set wait-threads breakpoint here"] + gdb_continue_to_breakpoint "run to breakpoint" +- gdb_test "info threads" "\\\* 1 .* 2 .* 3 .*" "info threads shows all threads" ++ gdb_test "info threads" "3 .* 2 .*\\\* 1.*" "info threads shows all threads" + + gdb_test_no_output "set scheduler-locking on" + +diff --git a/gdb/testsuite/gdb.threads/next-bp-other-thread.exp b/gdb/testsuite/gdb.threads/next-bp-other-thread.exp +index 4de3bf9..25791be 100644 +--- a/gdb/testsuite/gdb.threads/next-bp-other-thread.exp ++++ b/gdb/testsuite/gdb.threads/next-bp-other-thread.exp +@@ -35,7 +35,7 @@ foreach schedlock {"off" "step" "on" } { + + gdb_breakpoint [gdb_get_line_number "set wait-thread breakpoint here"] + gdb_continue_to_breakpoint "run to wait-thread breakpoint" +- gdb_test "info threads" "\\\* 1 .* 2 .*" "info threads shows all threads" ++ gdb_test "info threads" "2 .*\\\* 1.*" "info threads shows all threads" + + delete_breakpoints + +diff --git a/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp b/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp +index 4f5c05c..1354d03 100644 +--- a/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp ++++ b/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp +@@ -48,7 +48,7 @@ delete_breakpoints + + gdb_breakpoint [gdb_get_line_number "set breakpoint here"] + gdb_continue_to_breakpoint "run to nop breakpoint" +-gdb_test "info threads" " 1 .*\\\* 2 .*" "info threads shows all threads" ++gdb_test "info threads" "\\\* 2 .* 1.*" "info threads shows all threads" + + gdb_test "next" "while.*" "next over nop" + +diff --git a/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp b/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp +index a7273d4..aa91e29 100644 +--- a/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp ++++ b/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp +@@ -40,7 +40,7 @@ proc do_test {displaced command} { + + gdb_breakpoint [gdb_get_line_number "set wait-thread breakpoint here"] + gdb_continue_to_breakpoint "run to wait-thread breakpoint" +- gdb_test "info threads" "\\\* 1 .* 2 .*" "info threads shows all threads" ++ gdb_test "info threads" "2 .*\\\* 1.*" "info threads shows all threads" + + gdb_test_no_output "set scheduler-locking on" + +diff --git a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp +index 2f0be50..b0a7e4a 100644 +--- a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp ++++ b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp +@@ -59,7 +59,7 @@ proc do_test { displaced with_bp } { + + gdb_breakpoint [gdb_get_line_number "set wait-thread breakpoint here"] + gdb_continue_to_breakpoint "run to wait-thread breakpoint" +- gdb_test "info threads" "\\\* 1 .* 2 .*" "info threads shows all threads" ++ gdb_test "info threads" "2 .*\\\* 1.*" "info threads shows all threads" + + gdb_test_no_output "set scheduler-locking on" + +diff --git a/gdb/testsuite/gdb.threads/thread-find.exp b/gdb/testsuite/gdb.threads/thread-find.exp +index bd90c57..57d58a2 100644 +--- a/gdb/testsuite/gdb.threads/thread-find.exp ++++ b/gdb/testsuite/gdb.threads/thread-find.exp +@@ -55,11 +55,29 @@ gdb_test "thread apply 6 thread name threadname_6" \ + "name thread 6" + + # Collect thread ids, if any. +- + gdb_test_multiple "info threads" "collect thread id" { +- -re ". (\[0-9\]+) \[^\r\n\]*\[Tt\]hread (\[0-9a-fA-Fx\]+)\[^\r\n\]* \"threadname_\[0-9\]+\" \[^\r\n\]*" { +- set thr_num $expect_out(1,string) +- set thread$thr_num $expect_out(2,string) ++ -re ". 6 .*\[Tt\]hread (\[0-9a-fA-Fx\]+).* \"threadname_6\" \[^\r\n\]*" { ++ set thread6 $expect_out(1,string) ++ exp_continue ++ } ++ -re ". 5 .*\[Tt\]hread (\[0-9a-fA-Fx\]+).* \"threadname_5\" \[^\r\n\]*" { ++ set thread5 $expect_out(1,string) ++ exp_continue ++ } ++ -re ". 4 .*\[Tt\]hread (\[0-9a-fA-Fx\]+).* \"threadname_4\" \[^\r\n\]*" { ++ set thread4 $expect_out(1,string) ++ exp_continue ++ } ++ -re ". 3 .*\[Tt\]hread (\[0-9a-fA-Fx\]+).* \"threadname_3\" \[^\r\n\]*" { ++ set thread3 $expect_out(1,string) ++ exp_continue ++ } ++ -re ". 2 .*\[Tt\]hread (\[0-9a-fA-Fx\]+).* \"threadname_2\" \[^\r\n\]*" { ++ set thread2 $expect_out(1,string) ++ exp_continue ++ } ++ -re ". 1 .*\[Tt\]hread (\[0-9a-fA-Fx\]+).* \"threadname_1\" \[^\r\n\]*" { ++ set thread1 $expect_out(1,string) + exp_continue + } + -re ".*$gdb_prompt $" { +@@ -72,11 +90,29 @@ if { [info exists thread6] } then { + } + + # Collect process ids, if any. +- + gdb_test_multiple "info threads" "collect thread id" { +- -re ". (\[0-9\]+) \[^\r\n\]*\[Pp\]rocess (\[0-9a-fA-Fx\]+)\[^\r\n\]* \"threadname_\[0-9\]+\" \[^\r\n\]*" { +- set thr_num $expect_out(1,string) +- set process$thr_num $expect_out(2,string) ++ -re ". 6 .*\[Pp\]rocess (\[0-9a-fA-Fx\]+).* \"threadname_6\" \[^\r\n\]*" { ++ set process6 $expect_out(1,string) ++ exp_continue ++ } ++ -re ". 5 .*\[Pp\]rocess (\[0-9a-fA-Fx\]+).* \"threadname_5\" \[^\r\n\]*" { ++ set process5 $expect_out(1,string) ++ exp_continue ++ } ++ -re ". 4 .*\[Pp\]rocess (\[0-9a-fA-Fx\]+).* \"threadname_4\" \[^\r\n\]*" { ++ set process4 $expect_out(1,string) ++ exp_continue ++ } ++ -re ". 3 .*\[Pp\]rocess (\[0-9a-fA-Fx\]+).* \"threadname_3\" \[^\r\n\]*" { ++ set process3 $expect_out(1,string) ++ exp_continue ++ } ++ -re ". 2 .*\[Pp\]rocess (\[0-9a-fA-Fx\]+).* \"threadname_2\" \[^\r\n\]*" { ++ set process2 $expect_out(1,string) ++ exp_continue ++ } ++ -re ". 1 .*\[Pp\]rocess (\[0-9a-fA-Fx\]+).* \"threadname_1\" \[^\r\n\]*" { ++ set process1 $expect_out(1,string) + exp_continue + } + -re ".*$gdb_prompt $" { +@@ -89,11 +125,29 @@ if { [info exists process6] } then { + } + + # Collect lwp ids, if any. +- + gdb_test_multiple "info threads" "collect thread id" { +- -re ". (\[0-9\]+) \[^\r\n\]*LWP (\[0-9a-fA-Fx\]+)\[^\r\n\]* \"threadname_\[0-9\]+\" \[^\r\n\]*" { +- set thr_num $expect_out(1,string) +- set lwp$thr_num $expect_out(2,string) ++ -re ". 6 .*LWP (\[0-9a-fA-Fx\]+).* \"threadname_6\" \[^\r\n\]*" { ++ set lwp6 $expect_out(1,string) ++ exp_continue ++ } ++ -re ". 5 .*LWP (\[0-9a-fA-Fx\]+).* \"threadname_5\" \[^\r\n\]*" { ++ set lwp5 $expect_out(1,string) ++ exp_continue ++ } ++ -re ". 4 .*LWP (\[0-9a-fA-Fx\]+).* \"threadname_4\" \[^\r\n\]*" { ++ set lwp4 $expect_out(1,string) ++ exp_continue ++ } ++ -re ". 3 .*LWP (\[0-9a-fA-Fx\]+).* \"threadname_3\" \[^\r\n\]*" { ++ set lwp3 $expect_out(1,string) ++ exp_continue ++ } ++ -re ". 2 .*LWP (\[0-9a-fA-Fx\]+).* \"threadname_2\" \[^\r\n\]*" { ++ set lwp2 $expect_out(1,string) ++ exp_continue ++ } ++ -re ". 1 .*LWP (\[0-9a-fA-Fx\]+).* \"threadname_1\" \[^\r\n\]*" { ++ set lwp1 $expect_out(1,string) + exp_continue + } + -re ".*$gdb_prompt $" { +@@ -187,13 +241,36 @@ gdb_test "thread find foobarbaz" "No threads match .*" "no thread" + # Test regular expression + # + +-for {set i 1} {$i <= 6} {incr i} { +- set see$i 0 +-} ++set see1 0 ++set see2 0 ++set see3 0 ++set see4 0 ++set see5 0 ++set see6 0 ++ + gdb_test_multiple "thread find threadname_\[345\]" "test regular exp" { +- -re "Thread (\[0-9\]+) has name \[^\r\n\]*" { +- set thr_num $expect_out(1,string) +- set see$thr_num 1 ++ -re "Thread 6 has name \[^\r\n\]*" { ++ set see6 1 ++ exp_continue ++ } ++ -re "Thread 5 has name \[^\r\n\]*" { ++ set see5 1 ++ exp_continue ++ } ++ -re "Thread 4 has name \[^\r\n\]*" { ++ set see4 1 ++ exp_continue ++ } ++ -re "Thread 3 has name \[^\r\n\]*" { ++ set see3 1 ++ exp_continue ++ } ++ -re "Thread 2 has name \[^\r\n\]*" { ++ set see2 1 ++ exp_continue ++ } ++ -re "Thread 1 has name \[^\r\n\]*" { ++ set see1 1 + exp_continue + } + -re ".*$gdb_prompt $" { +@@ -209,13 +286,36 @@ gdb_test_multiple "thread find threadname_\[345\]" "test regular exp" { + # Test info threads on a subset of threads + # + +-for {set i 1} {$i <= 6} {incr i} { +- set see$i 0 +-} ++set see1 0 ++set see2 0 ++set see3 0 ++set see4 0 ++set see5 0 ++set see6 0 ++ + gdb_test_multiple "info threads 2 4 6" "info threads 2 4 6" { +- -re ". (\[0-9\]+) \[^\r\n\]*\"threadname_\[0-9\]+\" \[^\r\n\]*" { +- set thr_num $expect_out(1,string) +- set see$thr_num 1 ++ -re ". 6 \[^\r\n\]*\"threadname_6\" \[^\r\n\]*" { ++ set see6 1 ++ exp_continue ++ } ++ -re ". 5 \[^\r\n\]*\"threadname_5\" \[^\r\n\]*" { ++ set see5 1 ++ exp_continue ++ } ++ -re ". 4 \[^\r\n\]*\"threadname_4\" \[^\r\n\]*" { ++ set see4 1 ++ exp_continue ++ } ++ -re ". 3 \[^\r\n\]*\"threadname_3\" \[^\r\n\]*" { ++ set see3 1 ++ exp_continue ++ } ++ -re ". 2 \[^\r\n\]*\"threadname_2\" \[^\r\n\]*" { ++ set see2 1 ++ exp_continue ++ } ++ -re ". 1 \[^\r\n\]*\"threadname_1\" \[^\r\n\]*" { ++ set see1 1 + exp_continue + } + -re "$gdb_prompt $" { +@@ -231,13 +331,36 @@ gdb_test_multiple "info threads 2 4 6" "info threads 2 4 6" { + # Test info threads on a range + # + +-for {set i 1} {$i <= 6} {incr i} { +- set see$i 0 +-} ++set see1 0 ++set see2 0 ++set see3 0 ++set see4 0 ++set see5 0 ++set see6 0 ++ + gdb_test_multiple "info threads 3-5" "info threads 3-5" { +- -re ". (\[0-9\]+) \[^\r\n\]*\"threadname_\[0-9\]+\" \[^\r\n\]*" { +- set thr_num $expect_out(1,string) +- set see$thr_num 1 ++ -re ". 6 .*\"threadname_6\" \[^\r\n\]*" { ++ set see6 1 ++ exp_continue ++ } ++ -re ". 5 .*\"threadname_5\" \[^\r\n\]*" { ++ set see5 1 ++ exp_continue ++ } ++ -re ". 4 .*\"threadname_4\" \[^\r\n\]*" { ++ set see4 1 ++ exp_continue ++ } ++ -re ". 3 .*\"threadname_3\" \[^\r\n\]*" { ++ set see3 1 ++ exp_continue ++ } ++ -re ". 2 .*\"threadname_2\" \[^\r\n\]*" { ++ set see2 1 ++ exp_continue ++ } ++ -re ". 1 .*\"threadname_1\" \[^\r\n\]*" { ++ set see1 1 + exp_continue + } + -re "$gdb_prompt $" { +@@ -255,13 +378,36 @@ gdb_test "info threads 5-3" "inverted range" "test inverted range" + + # Test degenerate range + +-for {set i 1} {$i <= 6} {incr i} { +- set see$i 0 +-} ++set see1 0 ++set see2 0 ++set see3 0 ++set see4 0 ++set see5 0 ++set see6 0 ++ + gdb_test_multiple "info threads 3-3" "info threads 3-3" { +- -re ". (\[0-9\]+) .*\"threadname_\[0-9\]+\" \[^\r\n\]*" { +- set thr_num $expect_out(1,string) +- set see$thr_num 1 ++ -re ". 6 .*\"threadname_6\" \[^\r\n\]*" { ++ set see6 1 ++ exp_continue ++ } ++ -re ". 5 .*\"threadname_5\" \[^\r\n\]*" { ++ set see5 1 ++ exp_continue ++ } ++ -re ". 4 .*\"threadname_4\" \[^\r\n\]*" { ++ set see4 1 ++ exp_continue ++ } ++ -re ". 3 .*\"threadname_3\" \[^\r\n\]*" { ++ set see3 1 ++ exp_continue ++ } ++ -re ". 2 .*\"threadname_2\" \[^\r\n\]*" { ++ set see2 1 ++ exp_continue ++ } ++ -re ". 1 .*\"threadname_1\" \[^\r\n\]*" { ++ set see1 1 + exp_continue + } + -re ".*$gdb_prompt $" { +diff --git a/gdb/testsuite/gdb.threads/tls.exp b/gdb/testsuite/gdb.threads/tls.exp +index 4d0a235..cd7fc0a 100644 +--- a/gdb/testsuite/gdb.threads/tls.exp ++++ b/gdb/testsuite/gdb.threads/tls.exp +@@ -205,7 +205,7 @@ gdb_test "continue" ".*Breakpoint 3.*still alive.*" "continue to synch point" + set no_of_threads 0 + send_gdb "info thread\n" + gdb_expect { +- -re "^info thread\[ \t\r\n\]+ *Id .*Frame\[ \t\r\n\]+.*(\[0-9\]+) *Thread\[^\r\n\]+\r\n$gdb_prompt $" { ++ -re "^info thread\[ \t\r\n\]+ *Id .*Frame\[ \t\r\n\]+(\[0-9\]+) *Thread.*$gdb_prompt $" { + set no_of_threads $expect_out(1,string) + pass "get number of threads" + } +diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp +index 7f9a3f5..cb8227d 100644 +--- a/gdb/testsuite/lib/mi-support.exp ++++ b/gdb/testsuite/lib/mi-support.exp +@@ -1968,8 +1968,19 @@ proc mi_load_shlibs { args } { + mi_gdb_test "set solib-search-path [file dirname [lindex $args 0]]" "\^done" "" + } + +-proc mi_check_thread_states { states test } { ++proc mi_reverse_list { list } { ++ if { [llength $list] <= 1 } { ++ return $list ++ } ++ set tail [lrange $list 1 [llength $list]] ++ set rtail [mi_reverse_list $tail] ++ lappend rtail [lindex $list 0] ++ return $rtail ++} ++ ++proc mi_check_thread_states { xstates test } { + global expect_out ++ set states [mi_reverse_list $xstates] + set pattern ".*\\^done,threads=\\\[" + foreach s $states { + set pattern "${pattern}(.*)state=\"$s\"" +diff --git a/gdb/thread.c b/gdb/thread.c +index 4c2259f..29fc610 100644 +--- a/gdb/thread.c ++++ b/gdb/thread.c +@@ -236,17 +236,8 @@ new_thread (ptid_t ptid) + + tp->ptid = ptid; + tp->num = ++highest_thread_num; +- +- if (thread_list == NULL) +- thread_list = tp; +- else +- { +- struct thread_info *last; +- +- for (last = thread_list; last->next != NULL; last = last->next) +- ; +- last->next = tp; +- } ++ tp->next = thread_list; ++ thread_list = tp; + + /* Nothing to follow yet. */ + tp->pending_follow.kind = TARGET_WAITKIND_SPURIOUS; diff --git a/gdb-rhbz795424-bitpos-23of25.patch b/gdb-rhbz795424-bitpos-23of25.patch index c9d3ef8..1f6d237 100644 --- a/gdb-rhbz795424-bitpos-23of25.patch +++ b/gdb-rhbz795424-bitpos-23of25.patch @@ -137,11 +137,11 @@ Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=bitpos-tdep.patch -Index: gdb-7.10.50.20151022/gdb/alpha-tdep.c +Index: gdb-7.10.50.20160106/gdb/alpha-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/alpha-tdep.c 2015-10-24 23:14:17.792039327 +0200 -+++ gdb-7.10.50.20151022/gdb/alpha-tdep.c 2015-10-24 23:15:07.615370274 +0200 -@@ -299,17 +299,17 @@ alpha_push_dummy_call (struct gdbarch *g +--- gdb-7.10.50.20160106.orig/gdb/alpha-tdep.c 2016-01-08 19:16:16.592813990 +0100 ++++ gdb-7.10.50.20160106/gdb/alpha-tdep.c 2016-01-08 19:16:20.308834717 +0100 +@@ -299,17 +299,17 @@ { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int i; @@ -163,7 +163,7 @@ Index: gdb-7.10.50.20151022/gdb/alpha-tdep.c CORE_ADDR func_addr = find_function_addr (function, NULL); /* The ABI places the address of the called function in T12. */ -@@ -429,8 +429,8 @@ alpha_push_dummy_call (struct gdbarch *g +@@ -429,8 +429,8 @@ for (i = nargs; m_arg--, --i >= 0;) { const gdb_byte *contents = m_arg->contents; @@ -174,7 +174,7 @@ Index: gdb-7.10.50.20151022/gdb/alpha-tdep.c /* Copy the bytes destined for registers into arg_reg_buffer. */ if (offset < sizeof(arg_reg_buffer)) -@@ -442,7 +442,7 @@ alpha_push_dummy_call (struct gdbarch *g +@@ -442,7 +442,7 @@ } else { @@ -183,11 +183,11 @@ Index: gdb-7.10.50.20151022/gdb/alpha-tdep.c memcpy (arg_reg_buffer + offset, contents, tlen); offset += tlen; contents += tlen; -Index: gdb-7.10.50.20151022/gdb/amd64-tdep.c +Index: gdb-7.10.50.20160106/gdb/amd64-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/amd64-tdep.c 2015-10-24 23:14:17.793039333 +0200 -+++ gdb-7.10.50.20151022/gdb/amd64-tdep.c 2015-10-24 23:14:20.935060204 +0200 -@@ -701,7 +701,7 @@ amd64_return_value (struct gdbarch *gdba +--- gdb-7.10.50.20160106.orig/gdb/amd64-tdep.c 2016-01-08 19:16:16.594814001 +0100 ++++ gdb-7.10.50.20160106/gdb/amd64-tdep.c 2016-01-08 19:16:20.309834723 +0100 +@@ -699,7 +699,7 @@ gdb_byte *readbuf, const gdb_byte *writebuf) { enum amd64_reg_class theclass[2]; @@ -196,7 +196,7 @@ Index: gdb-7.10.50.20151022/gdb/amd64-tdep.c static int integer_regnum[] = { AMD64_RAX_REGNUM, AMD64_RDX_REGNUM }; static int sse_regnum[] = { AMD64_XMM0_REGNUM, AMD64_XMM1_REGNUM }; int integer_reg = 0; -@@ -852,8 +852,8 @@ amd64_push_arguments (struct regcache *r +@@ -850,8 +850,8 @@ }; struct value **stack_args = XALLOCAVEC (struct value *, nargs); int num_stack_args = 0; @@ -207,7 +207,7 @@ Index: gdb-7.10.50.20151022/gdb/amd64-tdep.c int integer_reg = 0; int sse_reg = 0; int i; -@@ -865,7 +865,7 @@ amd64_push_arguments (struct regcache *r +@@ -863,7 +863,7 @@ for (i = 0; i < nargs; i++) { struct type *type = value_type (args[i]); @@ -216,11 +216,11 @@ Index: gdb-7.10.50.20151022/gdb/amd64-tdep.c enum amd64_reg_class theclass[2]; int needed_integer_regs = 0; int needed_sse_regs = 0; -Index: gdb-7.10.50.20151022/gdb/amd64-windows-tdep.c +Index: gdb-7.10.50.20160106/gdb/amd64-windows-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/amd64-windows-tdep.c 2015-10-24 23:14:17.794039340 +0200 -+++ gdb-7.10.50.20151022/gdb/amd64-windows-tdep.c 2015-10-24 23:14:20.935060204 +0200 -@@ -288,7 +288,7 @@ amd64_windows_return_value (struct gdbar +--- gdb-7.10.50.20160106.orig/gdb/amd64-windows-tdep.c 2016-01-08 19:16:16.595814006 +0100 ++++ gdb-7.10.50.20160106/gdb/amd64-windows-tdep.c 2016-01-08 19:16:20.310834728 +0100 +@@ -288,7 +288,7 @@ struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) { @@ -229,11 +229,11 @@ Index: gdb-7.10.50.20151022/gdb/amd64-windows-tdep.c int regnum = -1; /* See if our value is returned through a register. If it is, then -Index: gdb-7.10.50.20151022/gdb/arm-tdep.c +Index: gdb-7.10.50.20160106/gdb/arm-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/arm-tdep.c 2015-10-24 23:14:17.800039380 +0200 -+++ gdb-7.10.50.20151022/gdb/arm-tdep.c 2015-10-24 23:14:20.937060217 +0200 -@@ -3531,7 +3531,7 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc +--- gdb-7.10.50.20160106.orig/gdb/arm-tdep.c 2016-01-08 19:16:16.603814051 +0100 ++++ gdb-7.10.50.20160106/gdb/arm-tdep.c 2016-01-08 19:17:05.737088107 +0100 +@@ -3340,7 +3340,7 @@ array). Vector types are not currently supported, matching the generic AAPCS support. */ @@ -242,16 +242,16 @@ Index: gdb-7.10.50.20151022/gdb/arm-tdep.c arm_vfp_cprc_sub_candidate (struct type *t, enum arm_vfp_cprc_base_type *base_type) { -@@ -3594,7 +3594,7 @@ arm_vfp_cprc_sub_candidate (struct type +@@ -3423,7 +3423,7 @@ + } + else + { +- int count; ++ LONGEST count; + unsigned unitlen; - case TYPE_CODE_ARRAY: - { -- int count; -+ LONGEST count; - unsigned unitlen; - count = arm_vfp_cprc_sub_candidate (TYPE_TARGET_TYPE (t), base_type); - if (count == -1) -@@ -3614,13 +3614,15 @@ arm_vfp_cprc_sub_candidate (struct type + count = arm_vfp_cprc_sub_candidate (TYPE_TARGET_TYPE (t), +@@ -3446,13 +3446,15 @@ case TYPE_CODE_STRUCT: { @@ -270,7 +270,7 @@ Index: gdb-7.10.50.20151022/gdb/arm-tdep.c if (sub_count == -1) return -1; count += sub_count; -@@ -3640,13 +3642,15 @@ arm_vfp_cprc_sub_candidate (struct type +@@ -3472,13 +3474,15 @@ case TYPE_CODE_UNION: { @@ -289,7 +289,7 @@ Index: gdb-7.10.50.20151022/gdb/arm-tdep.c if (sub_count == -1) return -1; count = (count > sub_count ? count : sub_count); -@@ -3682,7 +3686,7 @@ arm_vfp_call_candidate (struct type *t, +@@ -3514,7 +3518,7 @@ int *count) { enum arm_vfp_cprc_base_type b = VFP_CPRC_UNKNOWN; @@ -298,7 +298,7 @@ Index: gdb-7.10.50.20151022/gdb/arm-tdep.c if (c <= 0 || c > 4) return 0; *base_type = b; -@@ -3763,7 +3767,7 @@ arm_push_dummy_call (struct gdbarch *gdb +@@ -3595,7 +3599,7 @@ for (argnum = 0; argnum < nargs; argnum++) { @@ -307,11 +307,11 @@ Index: gdb-7.10.50.20151022/gdb/arm-tdep.c struct type *arg_type; struct type *target_type; enum type_code typecode; -Index: gdb-7.10.50.20151022/gdb/avr-tdep.c +Index: gdb-7.10.50.20160106/gdb/avr-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/avr-tdep.c 2015-10-24 23:14:17.801039386 +0200 -+++ gdb-7.10.50.20151022/gdb/avr-tdep.c 2015-10-24 23:15:35.775557325 +0200 -@@ -1196,13 +1196,13 @@ avr_dummy_id (struct gdbarch *gdbarch, s +--- gdb-7.10.50.20160106.orig/gdb/avr-tdep.c 2016-01-08 19:16:16.604814057 +0100 ++++ gdb-7.10.50.20160106/gdb/avr-tdep.c 2016-01-08 19:16:20.314834750 +0100 +@@ -1196,13 +1196,13 @@ struct stack_item { @@ -327,7 +327,7 @@ Index: gdb-7.10.50.20151022/gdb/avr-tdep.c { struct stack_item *si; si = XNEW (struct stack_item); -@@ -1291,12 +1291,12 @@ avr_push_dummy_call (struct gdbarch *gdb +@@ -1291,12 +1291,12 @@ for (i = 0; i < nargs; i++) { @@ -343,11 +343,11 @@ Index: gdb-7.10.50.20151022/gdb/avr-tdep.c /* Calculate the potential last register needed. */ last_regnum = regnum - (len + (len & 1)); -Index: gdb-7.10.50.20151022/gdb/bfin-tdep.c +Index: gdb-7.10.50.20160106/gdb/bfin-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/bfin-tdep.c 2015-10-24 23:14:17.802039393 +0200 -+++ gdb-7.10.50.20151022/gdb/bfin-tdep.c 2015-10-24 23:14:20.937060217 +0200 -@@ -504,7 +504,7 @@ bfin_push_dummy_call (struct gdbarch *gd +--- gdb-7.10.50.20160106.orig/gdb/bfin-tdep.c 2016-01-08 19:16:16.605814062 +0100 ++++ gdb-7.10.50.20160106/gdb/bfin-tdep.c 2016-01-08 19:16:20.315834756 +0100 +@@ -504,7 +504,7 @@ gdb_byte buf[4]; int i; long reg_r0, reg_r1, reg_r2; @@ -356,7 +356,7 @@ Index: gdb-7.10.50.20151022/gdb/bfin-tdep.c enum bfin_abi abi = bfin_abi (gdbarch); CORE_ADDR func_addr = find_function_addr (function, NULL); -@@ -528,7 +528,7 @@ bfin_push_dummy_call (struct gdbarch *gd +@@ -528,7 +528,7 @@ { struct type *value_type = value_enclosing_type (args[i]); struct type *arg_type = check_typedef (value_type); @@ -364,12 +364,12 @@ Index: gdb-7.10.50.20151022/gdb/bfin-tdep.c + ssize_t container_len = (TYPE_LENGTH (value_type) + 3) & ~3; sp -= container_len; - write_memory (sp, value_contents_writeable (args[i]), container_len); -Index: gdb-7.10.50.20151022/gdb/cris-tdep.c + write_memory (sp, value_contents (args[i]), container_len); +Index: gdb-7.10.50.20160106/gdb/cris-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/cris-tdep.c 2015-10-24 23:14:17.802039393 +0200 -+++ gdb-7.10.50.20151022/gdb/cris-tdep.c 2015-10-24 23:15:58.902710945 +0200 -@@ -663,13 +663,13 @@ static CORE_ADDR cris_unwind_sp (struct +--- gdb-7.10.50.20160106.orig/gdb/cris-tdep.c 2016-01-08 19:16:16.606814068 +0100 ++++ gdb-7.10.50.20160106/gdb/cris-tdep.c 2016-01-08 19:16:20.316834762 +0100 +@@ -663,13 +663,13 @@ struct stack_item { @@ -385,7 +385,7 @@ Index: gdb-7.10.50.20151022/gdb/cris-tdep.c { struct stack_item *si = XNEW (struct stack_item); si->data = (gdb_byte *) xmalloc (len); -@@ -841,13 +841,13 @@ cris_push_dummy_call (struct gdbarch *gd +@@ -841,13 +841,13 @@ for (argnum = 0; argnum < nargs; argnum++) { @@ -403,11 +403,11 @@ Index: gdb-7.10.50.20151022/gdb/cris-tdep.c /* How may registers worth of storage do we need for this argument? */ reg_demand = (len / 4) + (len % 4 != 0 ? 1 : 0); -Index: gdb-7.10.50.20151022/gdb/h8300-tdep.c +Index: gdb-7.10.50.20160106/gdb/h8300-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/h8300-tdep.c 2015-10-24 23:14:17.803039400 +0200 -+++ gdb-7.10.50.20151022/gdb/h8300-tdep.c 2015-10-24 23:16:33.653941777 +0200 -@@ -639,7 +639,7 @@ h8300_push_dummy_call (struct gdbarch *g +--- gdb-7.10.50.20160106.orig/gdb/h8300-tdep.c 2016-01-08 19:16:16.607814073 +0100 ++++ gdb-7.10.50.20160106/gdb/h8300-tdep.c 2016-01-08 19:16:20.316834762 +0100 +@@ -639,7 +639,7 @@ int struct_return, CORE_ADDR struct_addr) { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -416,7 +416,7 @@ Index: gdb-7.10.50.20151022/gdb/h8300-tdep.c int wordsize = BINWORD (gdbarch); int reg = E_ARG0_REGNUM; int argument; -@@ -666,11 +666,11 @@ h8300_push_dummy_call (struct gdbarch *g +@@ -666,11 +666,11 @@ { struct cleanup *back_to; struct type *type = value_type (args[argument]); @@ -430,7 +430,7 @@ Index: gdb-7.10.50.20151022/gdb/h8300-tdep.c gdb_byte *padded = (gdb_byte *) xmalloc (padded_len); back_to = make_cleanup (xfree, padded); -@@ -699,7 +699,7 @@ h8300_push_dummy_call (struct gdbarch *g +@@ -699,7 +699,7 @@ /* Heavens to Betsy --- it's really going in registers! Note that on the h8/300s, there are gaps between the registers in the register file. */ @@ -439,11 +439,11 @@ Index: gdb-7.10.50.20151022/gdb/h8300-tdep.c for (offset = 0; offset < padded_len; offset += wordsize) { -Index: gdb-7.10.50.20151022/gdb/hppa-tdep.c +Index: gdb-7.10.50.20160106/gdb/hppa-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/hppa-tdep.c 2015-10-24 23:14:17.804039407 +0200 -+++ gdb-7.10.50.20151022/gdb/hppa-tdep.c 2015-10-24 23:14:20.939060231 +0200 -@@ -996,7 +996,7 @@ hppa64_push_dummy_call (struct gdbarch * +--- gdb-7.10.50.20160106.orig/gdb/hppa-tdep.c 2016-01-08 19:16:16.609814085 +0100 ++++ gdb-7.10.50.20160106/gdb/hppa-tdep.c 2016-01-08 19:16:20.317834767 +0100 +@@ -995,7 +995,7 @@ { struct value *arg = args[i]; struct type *type = value_type (arg); @@ -452,7 +452,7 @@ Index: gdb-7.10.50.20151022/gdb/hppa-tdep.c const bfd_byte *valbuf; bfd_byte fptrbuf[8]; int regnum; -@@ -1191,7 +1191,7 @@ hppa64_return_value (struct gdbarch *gdb +@@ -1190,7 +1190,7 @@ struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) { @@ -461,11 +461,11 @@ Index: gdb-7.10.50.20151022/gdb/hppa-tdep.c int regnum, offset; if (len > 16) -Index: gdb-7.10.50.20151022/gdb/i386-darwin-tdep.c +Index: gdb-7.10.50.20160106/gdb/i386-darwin-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/i386-darwin-tdep.c 2015-10-24 23:14:17.804039407 +0200 -+++ gdb-7.10.50.20151022/gdb/i386-darwin-tdep.c 2015-10-24 23:14:20.939060231 +0200 -@@ -163,7 +163,7 @@ i386_darwin_push_dummy_call (struct gdba +--- gdb-7.10.50.20160106.orig/gdb/i386-darwin-tdep.c 2016-01-08 19:16:16.609814085 +0100 ++++ gdb-7.10.50.20160106/gdb/i386-darwin-tdep.c 2016-01-08 19:16:20.317834767 +0100 +@@ -163,7 +163,7 @@ for (write_pass = 0; write_pass < 2; write_pass++) { @@ -474,11 +474,11 @@ Index: gdb-7.10.50.20151022/gdb/i386-darwin-tdep.c int num_m128 = 0; if (struct_return) -Index: gdb-7.10.50.20151022/gdb/i386-tdep.c +Index: gdb-7.10.50.20160106/gdb/i386-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/i386-tdep.c 2015-10-24 23:14:17.807039426 +0200 -+++ gdb-7.10.50.20151022/gdb/i386-tdep.c 2015-10-24 23:14:20.940060237 +0200 -@@ -2651,7 +2651,7 @@ i386_push_dummy_call (struct gdbarch *gd +--- gdb-7.10.50.20160106.orig/gdb/i386-tdep.c 2016-01-08 19:16:16.615814118 +0100 ++++ gdb-7.10.50.20160106/gdb/i386-tdep.c 2016-01-08 19:16:20.319834778 +0100 +@@ -2663,7 +2663,7 @@ gdb_byte buf[4]; int i; int write_pass; @@ -487,7 +487,7 @@ Index: gdb-7.10.50.20151022/gdb/i386-tdep.c /* Determine the total space required for arguments and struct return address in a first pass (allowing for 16-byte-aligned -@@ -2659,7 +2659,7 @@ i386_push_dummy_call (struct gdbarch *gd +@@ -2671,7 +2671,7 @@ for (write_pass = 0; write_pass < 2; write_pass++) { @@ -496,7 +496,7 @@ Index: gdb-7.10.50.20151022/gdb/i386-tdep.c if (struct_return) { -@@ -2676,7 +2676,7 @@ i386_push_dummy_call (struct gdbarch *gd +@@ -2688,7 +2688,7 @@ for (i = 0; i < nargs; i++) { @@ -505,7 +505,7 @@ Index: gdb-7.10.50.20151022/gdb/i386-tdep.c if (write_pass) { -@@ -2883,7 +2883,7 @@ i386_reg_struct_return_p (struct gdbarch +@@ -2895,7 +2895,7 @@ { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); enum type_code code = TYPE_CODE (type); @@ -514,7 +514,7 @@ Index: gdb-7.10.50.20151022/gdb/i386-tdep.c gdb_assert (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION -@@ -3629,7 +3629,7 @@ static int +@@ -3641,7 +3641,7 @@ i386_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type) { @@ -523,7 +523,7 @@ Index: gdb-7.10.50.20151022/gdb/i386-tdep.c /* Values may be spread across multiple registers. Most debugging formats aren't expressive enough to specify the locations, so -@@ -3662,7 +3662,7 @@ i386_register_to_value (struct frame_inf +@@ -3674,7 +3674,7 @@ int *optimizedp, int *unavailablep) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -532,7 +532,7 @@ Index: gdb-7.10.50.20151022/gdb/i386-tdep.c if (i386_fp_regnum_p (gdbarch, regnum)) return i387_register_to_value (frame, regnum, type, to, -@@ -3698,7 +3698,7 @@ static void +@@ -3710,7 +3710,7 @@ i386_value_to_register (struct frame_info *frame, int regnum, struct type *type, const gdb_byte *from) { @@ -541,11 +541,11 @@ Index: gdb-7.10.50.20151022/gdb/i386-tdep.c if (i386_fp_regnum_p (get_frame_arch (frame), regnum)) { -Index: gdb-7.10.50.20151022/gdb/iq2000-tdep.c +Index: gdb-7.10.50.20160106/gdb/iq2000-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/iq2000-tdep.c 2015-10-24 23:14:17.808039433 +0200 -+++ gdb-7.10.50.20151022/gdb/iq2000-tdep.c 2015-10-24 23:14:20.941060244 +0200 -@@ -651,8 +651,9 @@ iq2000_push_dummy_call (struct gdbarch * +--- gdb-7.10.50.20160106.orig/gdb/iq2000-tdep.c 2016-01-08 19:16:16.616814124 +0100 ++++ gdb-7.10.50.20160106/gdb/iq2000-tdep.c 2016-01-08 19:16:20.320834784 +0100 +@@ -651,8 +651,9 @@ const bfd_byte *val; bfd_byte buf[4]; struct type *type; @@ -557,11 +557,11 @@ Index: gdb-7.10.50.20151022/gdb/iq2000-tdep.c /* Used to copy struct arguments into the stack. */ CORE_ADDR struct_ptr; -Index: gdb-7.10.50.20151022/gdb/m32r-tdep.c +Index: gdb-7.10.50.20160106/gdb/m32r-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/m32r-tdep.c 2015-10-24 23:14:17.808039433 +0200 -+++ gdb-7.10.50.20151022/gdb/m32r-tdep.c 2015-10-24 23:14:20.941060244 +0200 -@@ -687,7 +687,7 @@ m32r_push_dummy_call (struct gdbarch *gd +--- gdb-7.10.50.20160106.orig/gdb/m32r-tdep.c 2016-01-08 19:16:16.616814124 +0100 ++++ gdb-7.10.50.20160106/gdb/m32r-tdep.c 2016-01-08 19:16:20.320834784 +0100 +@@ -687,7 +687,7 @@ CORE_ADDR regval; gdb_byte *val; gdb_byte valbuf[MAX_REGISTER_SIZE]; @@ -570,11 +570,11 @@ Index: gdb-7.10.50.20151022/gdb/m32r-tdep.c /* First force sp to a 4-byte alignment. */ sp = sp & ~3; -Index: gdb-7.10.50.20151022/gdb/m68k-tdep.c +Index: gdb-7.10.50.20160106/gdb/m68k-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/m68k-tdep.c 2015-10-24 23:14:17.808039433 +0200 -+++ gdb-7.10.50.20151022/gdb/m68k-tdep.c 2015-10-24 23:14:20.941060244 +0200 -@@ -382,7 +382,7 @@ m68k_reg_struct_return_p (struct gdbarch +--- gdb-7.10.50.20160106.orig/gdb/m68k-tdep.c 2016-01-08 19:16:16.617814129 +0100 ++++ gdb-7.10.50.20160106/gdb/m68k-tdep.c 2016-01-08 19:16:20.320834784 +0100 +@@ -382,7 +382,7 @@ { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); enum type_code code = TYPE_CODE (type); @@ -583,7 +583,7 @@ Index: gdb-7.10.50.20151022/gdb/m68k-tdep.c gdb_assert (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION || code == TYPE_CODE_COMPLEX); -@@ -514,9 +514,9 @@ m68k_push_dummy_call (struct gdbarch *gd +@@ -514,9 +514,9 @@ for (i = nargs - 1; i >= 0; i--) { struct type *value_type = value_enclosing_type (args[i]); @@ -596,11 +596,11 @@ Index: gdb-7.10.50.20151022/gdb/m68k-tdep.c /* Non-scalars bigger than 4 bytes are left aligned, others are right aligned. */ -Index: gdb-7.10.50.20151022/gdb/m88k-tdep.c +Index: gdb-7.10.50.20160106/gdb/m88k-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/m88k-tdep.c 2015-10-24 23:14:17.809039440 +0200 -+++ gdb-7.10.50.20151022/gdb/m88k-tdep.c 2015-10-24 23:14:20.942060250 +0200 -@@ -257,13 +257,13 @@ m88k_store_arguments (struct regcache *r +--- gdb-7.10.50.20160106.orig/gdb/m88k-tdep.c 2016-01-08 19:16:16.617814129 +0100 ++++ gdb-7.10.50.20160106/gdb/m88k-tdep.c 2016-01-08 19:16:20.321834790 +0100 +@@ -257,13 +257,13 @@ { struct gdbarch *gdbarch = get_regcache_arch (regcache); int num_register_words = 0; @@ -616,7 +616,7 @@ Index: gdb-7.10.50.20151022/gdb/m88k-tdep.c if (m88k_integral_or_pointer_p (type) && len < 4) { -@@ -305,8 +305,8 @@ m88k_store_arguments (struct regcache *r +@@ -305,8 +305,8 @@ { const bfd_byte *valbuf = value_contents (args[i]); struct type *type = value_type (args[i]); @@ -627,11 +627,11 @@ Index: gdb-7.10.50.20151022/gdb/m88k-tdep.c if (m88k_in_register_p (type)) { -Index: gdb-7.10.50.20151022/gdb/mep-tdep.c +Index: gdb-7.10.50.20160106/gdb/mep-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/mep-tdep.c 2015-10-24 23:14:17.809039440 +0200 -+++ gdb-7.10.50.20151022/gdb/mep-tdep.c 2015-10-24 23:14:20.942060250 +0200 -@@ -2270,7 +2270,7 @@ push_large_arguments (CORE_ADDR sp, int +--- gdb-7.10.50.20160106.orig/gdb/mep-tdep.c 2016-01-08 19:16:16.618814135 +0100 ++++ gdb-7.10.50.20160106/gdb/mep-tdep.c 2016-01-08 19:16:20.321834790 +0100 +@@ -2272,7 +2272,7 @@ for (i = 0; i < argc; i++) { @@ -640,11 +640,11 @@ Index: gdb-7.10.50.20151022/gdb/mep-tdep.c if (arg_len > MEP_GPR_SIZE) { -Index: gdb-7.10.50.20151022/gdb/mips-tdep.c +Index: gdb-7.10.50.20160106/gdb/mips-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/mips-tdep.c 2015-10-24 23:14:17.814039473 +0200 -+++ gdb-7.10.50.20151022/gdb/mips-tdep.c 2015-10-24 23:14:20.943060257 +0200 -@@ -455,7 +455,7 @@ static void +--- gdb-7.10.50.20160106.orig/gdb/mips-tdep.c 2016-01-08 19:16:16.626814179 +0100 ++++ gdb-7.10.50.20160106/gdb/mips-tdep.c 2016-01-08 19:16:20.324834806 +0100 +@@ -455,7 +455,7 @@ mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache, int reg_num, int length, enum bfd_endian endian, gdb_byte *in, @@ -653,7 +653,7 @@ Index: gdb-7.10.50.20151022/gdb/mips-tdep.c { int reg_offset = 0; -@@ -478,8 +478,8 @@ mips_xfer_register (struct gdbarch *gdba +@@ -478,8 +478,8 @@ } if (mips_debug) fprintf_unfiltered (gdb_stderr, @@ -664,7 +664,7 @@ Index: gdb-7.10.50.20151022/gdb/mips-tdep.c if (mips_debug && out != NULL) { int i; -@@ -4554,13 +4554,13 @@ mips_eabi_push_dummy_call (struct gdbarc +@@ -4554,13 +4554,13 @@ gdb_byte valbuf[MAX_REGISTER_SIZE]; struct value *arg = args[argnum]; struct type *arg_type = check_typedef (value_type (arg)); @@ -681,7 +681,7 @@ Index: gdb-7.10.50.20151022/gdb/mips-tdep.c /* The EABI passes structures that do not fit in a register by reference. */ -@@ -4829,7 +4829,7 @@ mips_eabi_return_value (struct gdbarch * +@@ -4829,7 +4829,7 @@ static int mips_n32n64_fp_arg_chunk_p (struct gdbarch *gdbarch, struct type *arg_type, @@ -690,7 +690,7 @@ Index: gdb-7.10.50.20151022/gdb/mips-tdep.c { int i; -@@ -4844,7 +4844,7 @@ mips_n32n64_fp_arg_chunk_p (struct gdbar +@@ -4844,7 +4844,7 @@ for (i = 0; i < TYPE_NFIELDS (arg_type); i++) { @@ -699,7 +699,7 @@ Index: gdb-7.10.50.20151022/gdb/mips-tdep.c struct type *field_type; /* We're only looking at normal fields. */ -@@ -4886,7 +4886,7 @@ mips_n32n64_push_dummy_call (struct gdba +@@ -4886,7 +4886,7 @@ int argreg; int float_argreg; int argnum; @@ -708,7 +708,7 @@ Index: gdb-7.10.50.20151022/gdb/mips-tdep.c int stack_offset = 0; enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR func_addr = find_function_addr (function, NULL); -@@ -5237,11 +5237,11 @@ mips_n32n64_return_value (struct gdbarch +@@ -5237,11 +5237,11 @@ : MIPS_V0_REGNUM); field < TYPE_NFIELDS (type); field++, regnum += 2) { @@ -724,7 +724,7 @@ Index: gdb-7.10.50.20151022/gdb/mips-tdep.c if (TYPE_LENGTH (TYPE_FIELD_TYPE (type, field)) == 16) { /* A 16-byte long double field goes in two consecutive -@@ -5283,8 +5283,8 @@ mips_n32n64_return_value (struct gdbarch +@@ -5283,8 +5283,8 @@ if (offset + xfer > TYPE_LENGTH (type)) xfer = TYPE_LENGTH (type) - offset; if (mips_debug) @@ -735,7 +735,7 @@ Index: gdb-7.10.50.20151022/gdb/mips-tdep.c mips_xfer_register (gdbarch, regcache, gdbarch_num_regs (gdbarch) + regnum, xfer, BFD_ENDIAN_UNKNOWN, readbuf, writebuf, -@@ -5342,7 +5342,7 @@ mips_o32_push_dummy_call (struct gdbarch +@@ -5342,7 +5342,7 @@ int argreg; int float_argreg; int argnum; @@ -744,7 +744,7 @@ Index: gdb-7.10.50.20151022/gdb/mips-tdep.c int stack_offset = 0; enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR func_addr = find_function_addr (function, NULL); -@@ -5406,13 +5406,13 @@ mips_o32_push_dummy_call (struct gdbarch +@@ -5406,13 +5406,13 @@ const gdb_byte *val; struct value *arg = args[argnum]; struct type *arg_type = check_typedef (value_type (arg)); @@ -761,7 +761,7 @@ Index: gdb-7.10.50.20151022/gdb/mips-tdep.c val = value_contents (arg); -@@ -5870,8 +5870,8 @@ mips_o64_push_dummy_call (struct gdbarch +@@ -5870,8 +5870,8 @@ int argreg; int float_argreg; int argnum; @@ -772,7 +772,7 @@ Index: gdb-7.10.50.20151022/gdb/mips-tdep.c enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR func_addr = find_function_addr (function, NULL); -@@ -5931,13 +5931,13 @@ mips_o64_push_dummy_call (struct gdbarch +@@ -5931,13 +5931,13 @@ const gdb_byte *val; struct value *arg = args[argnum]; struct type *arg_type = check_typedef (value_type (arg)); @@ -789,11 +789,11 @@ Index: gdb-7.10.50.20151022/gdb/mips-tdep.c val = value_contents (arg); -Index: gdb-7.10.50.20151022/gdb/mn10300-tdep.c +Index: gdb-7.10.50.20160106/gdb/mn10300-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/mn10300-tdep.c 2015-10-24 23:14:17.815039480 +0200 -+++ gdb-7.10.50.20151022/gdb/mn10300-tdep.c 2015-10-24 23:14:20.943060257 +0200 -@@ -1227,7 +1227,7 @@ mn10300_push_dummy_call (struct gdbarch +--- gdb-7.10.50.20160106.orig/gdb/mn10300-tdep.c 2016-01-08 19:16:16.627814185 +0100 ++++ gdb-7.10.50.20160106/gdb/mn10300-tdep.c 2016-01-08 19:16:20.324834806 +0100 +@@ -1227,7 +1227,7 @@ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); const int push_size = register_size (gdbarch, E_PC_REGNUM); int regs_used; @@ -802,11 +802,11 @@ Index: gdb-7.10.50.20151022/gdb/mn10300-tdep.c int stack_offset = 0; int argnum; const gdb_byte *val; -Index: gdb-7.10.50.20151022/gdb/mt-tdep.c +Index: gdb-7.10.50.20160106/gdb/mt-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/mt-tdep.c 2015-10-24 23:14:17.815039480 +0200 -+++ gdb-7.10.50.20151022/gdb/mt-tdep.c 2015-10-24 23:14:20.944060264 +0200 -@@ -781,9 +781,9 @@ mt_push_dummy_call (struct gdbarch *gdba +--- gdb-7.10.50.20160106.orig/gdb/mt-tdep.c 2016-01-08 19:16:16.628814190 +0100 ++++ gdb-7.10.50.20160106/gdb/mt-tdep.c 2016-01-08 19:16:20.324834806 +0100 +@@ -781,9 +781,9 @@ gdb_byte buf[MT_MAX_STRUCT_SIZE]; int argreg = MT_1ST_ARGREG; int split_param_len = 0; @@ -818,11 +818,11 @@ Index: gdb-7.10.50.20151022/gdb/mt-tdep.c int i, j; /* First handle however many args we can fit into MT_1ST_ARGREG thru -Index: gdb-7.10.50.20151022/gdb/ppc-sysv-tdep.c +Index: gdb-7.10.50.20160106/gdb/ppc-sysv-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/ppc-sysv-tdep.c 2015-10-24 23:14:17.816039486 +0200 -+++ gdb-7.10.50.20151022/gdb/ppc-sysv-tdep.c 2015-10-24 23:14:20.944060264 +0200 -@@ -66,7 +66,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb +--- gdb-7.10.50.20160106.orig/gdb/ppc-sysv-tdep.c 2016-01-08 19:16:16.629814196 +0100 ++++ gdb-7.10.50.20160106/gdb/ppc-sysv-tdep.c 2016-01-08 19:16:20.325834812 +0100 +@@ -66,7 +66,7 @@ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function)); ULONGEST saved_sp; @@ -831,7 +831,7 @@ Index: gdb-7.10.50.20151022/gdb/ppc-sysv-tdep.c int write_pass; gdb_assert (tdep->wordsize == 4); -@@ -97,9 +97,9 @@ ppc_sysv_abi_push_dummy_call (struct gdb +@@ -97,9 +97,9 @@ /* Next available vector register for vector arguments. */ int vreg = 2; /* Arguments start above the "LR save word" and "Back chain". */ @@ -843,7 +843,7 @@ Index: gdb-7.10.50.20151022/gdb/ppc-sysv-tdep.c /* If the function is returning a `struct', then the first word (which will be passed in r3) is used for struct return -@@ -118,7 +118,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb +@@ -118,7 +118,7 @@ { struct value *arg = args[argno]; struct type *type = check_typedef (value_type (arg)); @@ -852,7 +852,7 @@ Index: gdb-7.10.50.20151022/gdb/ppc-sysv-tdep.c const bfd_byte *val = value_contents (arg); if (TYPE_CODE (type) == TYPE_CODE_FLT && len <= 8 -@@ -1283,11 +1283,11 @@ struct ppc64_sysv_argpos +@@ -1283,11 +1283,11 @@ static void ppc64_sysv_abi_push_val (struct gdbarch *gdbarch, @@ -866,11 +866,11 @@ Index: gdb-7.10.50.20151022/gdb/ppc-sysv-tdep.c /* Enforce alignment of stack location, if requested. */ if (align > tdep->wordsize) -Index: gdb-7.10.50.20151022/gdb/rl78-tdep.c +Index: gdb-7.10.50.20160106/gdb/rl78-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/rl78-tdep.c 2015-10-24 23:14:17.816039486 +0200 -+++ gdb-7.10.50.20151022/gdb/rl78-tdep.c 2015-10-24 23:14:20.944060264 +0200 -@@ -1338,8 +1338,8 @@ rl78_push_dummy_call (struct gdbarch *gd +--- gdb-7.10.50.20160106.orig/gdb/rl78-tdep.c 2016-01-08 19:16:16.629814196 +0100 ++++ gdb-7.10.50.20160106/gdb/rl78-tdep.c 2016-01-08 19:16:20.325834812 +0100 +@@ -1336,8 +1336,8 @@ for (i = nargs - 1; i >= 0; i--) { struct type *value_type = value_enclosing_type (args[i]); @@ -881,11 +881,11 @@ Index: gdb-7.10.50.20151022/gdb/rl78-tdep.c sp -= container_len; write_memory (rl78_make_data_address (sp), -Index: gdb-7.10.50.20151022/gdb/rs6000-aix-tdep.c +Index: gdb-7.10.50.20160106/gdb/rs6000-aix-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/rs6000-aix-tdep.c 2015-10-24 23:14:17.816039486 +0200 -+++ gdb-7.10.50.20151022/gdb/rs6000-aix-tdep.c 2015-10-24 23:14:20.944060264 +0200 -@@ -186,9 +186,9 @@ rs6000_push_dummy_call (struct gdbarch * +--- gdb-7.10.50.20160106.orig/gdb/rs6000-aix-tdep.c 2016-01-08 19:16:16.630814202 +0100 ++++ gdb-7.10.50.20160106/gdb/rs6000-aix-tdep.c 2016-01-08 19:16:20.326834817 +0100 +@@ -186,9 +186,9 @@ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int ii; @@ -897,7 +897,7 @@ Index: gdb-7.10.50.20151022/gdb/rs6000-aix-tdep.c gdb_byte tmp_buffer[50]; int f_argno = 0; /* current floating point argno */ int wordsize = gdbarch_tdep (gdbarch)->wordsize; -@@ -321,7 +321,7 @@ ran_out_of_registers_for_arguments: +@@ -321,7 +321,7 @@ if ((argno < nargs) || argbytes) { @@ -906,11 +906,11 @@ Index: gdb-7.10.50.20151022/gdb/rs6000-aix-tdep.c if (argbytes) { -Index: gdb-7.10.50.20151022/gdb/s390-linux-tdep.c +Index: gdb-7.10.50.20160106/gdb/s390-linux-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/s390-linux-tdep.c 2015-10-24 23:14:17.817039493 +0200 -+++ gdb-7.10.50.20151022/gdb/s390-linux-tdep.c 2015-10-24 23:14:20.945060270 +0200 -@@ -2571,7 +2571,7 @@ s390_function_arg_vector (struct type *t +--- gdb-7.10.50.20160106.orig/gdb/s390-linux-tdep.c 2016-01-08 19:16:16.632814213 +0100 ++++ gdb-7.10.50.20160106/gdb/s390-linux-tdep.c 2016-01-08 19:16:20.328834829 +0100 +@@ -2981,7 +2981,7 @@ /* Determine whether N is a power of two. */ static int @@ -919,7 +919,7 @@ Index: gdb-7.10.50.20151022/gdb/s390-linux-tdep.c { return n && ((n & (n - 1)) == 0); } -@@ -2628,7 +2628,7 @@ s390_handle_arg (struct s390_arg_state * +@@ -3038,7 +3038,7 @@ enum bfd_endian byte_order, int is_unnamed) { struct type *type = check_typedef (value_type (arg)); @@ -928,11 +928,11 @@ Index: gdb-7.10.50.20151022/gdb/s390-linux-tdep.c int write_mode = as->regcache != NULL; if (s390_function_arg_float (type)) -Index: gdb-7.10.50.20151022/gdb/score-tdep.c +Index: gdb-7.10.50.20160106/gdb/score-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/score-tdep.c 2015-10-24 23:14:17.817039493 +0200 -+++ gdb-7.10.50.20151022/gdb/score-tdep.c 2015-10-24 23:14:20.945060270 +0200 -@@ -514,7 +514,7 @@ score_push_dummy_call (struct gdbarch *g +--- gdb-7.10.50.20160106.orig/gdb/score-tdep.c 2016-01-08 19:16:16.633814218 +0100 ++++ gdb-7.10.50.20160106/gdb/score-tdep.c 2016-01-08 19:16:20.328834829 +0100 +@@ -514,7 +514,7 @@ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int argnum; int argreg; @@ -941,11 +941,11 @@ Index: gdb-7.10.50.20151022/gdb/score-tdep.c CORE_ADDR stack_offset = 0; CORE_ADDR addr = 0; -Index: gdb-7.10.50.20151022/gdb/sh-tdep.c +Index: gdb-7.10.50.20160106/gdb/sh-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/sh-tdep.c 2015-10-24 23:14:17.818039499 +0200 -+++ gdb-7.10.50.20151022/gdb/sh-tdep.c 2015-10-24 23:14:20.946060277 +0200 -@@ -805,7 +805,7 @@ sh_skip_prologue (struct gdbarch *gdbarc +--- gdb-7.10.50.20160106.orig/gdb/sh-tdep.c 2016-01-08 19:16:16.635814230 +0100 ++++ gdb-7.10.50.20160106/gdb/sh-tdep.c 2016-01-08 19:16:20.329834834 +0100 +@@ -805,7 +805,7 @@ static int sh_use_struct_convention (int renesas_abi, struct type *type) { @@ -954,7 +954,7 @@ Index: gdb-7.10.50.20151022/gdb/sh-tdep.c int nelem = TYPE_NFIELDS (type); /* The Renesas ABI returns aggregate types always on stack. */ -@@ -907,7 +907,7 @@ sh_frame_align (struct gdbarch *ignore, +@@ -907,7 +907,7 @@ /* Helper function to justify value in register according to endianess. */ static const gdb_byte * @@ -963,7 +963,7 @@ Index: gdb-7.10.50.20151022/gdb/sh-tdep.c { static gdb_byte valbuf[4]; -@@ -1067,7 +1067,8 @@ sh_push_dummy_call_fpu (struct gdbarch * +@@ -1067,7 +1067,8 @@ struct type *type; CORE_ADDR regval; const gdb_byte *val; @@ -973,7 +973,7 @@ Index: gdb-7.10.50.20151022/gdb/sh-tdep.c int pass_on_stack = 0; int treat_as_flt; int last_reg_arg = INT_MAX; -@@ -1208,7 +1209,8 @@ sh_push_dummy_call_nofpu (struct gdbarch +@@ -1208,7 +1209,8 @@ struct type *type; CORE_ADDR regval; const gdb_byte *val; @@ -983,11 +983,11 @@ Index: gdb-7.10.50.20151022/gdb/sh-tdep.c int pass_on_stack = 0; int last_reg_arg = INT_MAX; -Index: gdb-7.10.50.20151022/gdb/sh64-tdep.c +Index: gdb-7.10.50.20160106/gdb/sh64-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/sh64-tdep.c 2015-10-24 23:14:17.819039506 +0200 -+++ gdb-7.10.50.20151022/gdb/sh64-tdep.c 2015-10-24 23:14:20.946060277 +0200 -@@ -1056,7 +1056,7 @@ sh64_push_dummy_call (struct gdbarch *gd +--- gdb-7.10.50.20160106.orig/gdb/sh64-tdep.c 2016-01-08 19:16:16.635814230 +0100 ++++ gdb-7.10.50.20160106/gdb/sh64-tdep.c 2016-01-08 19:16:20.329834834 +0100 +@@ -1056,7 +1056,7 @@ CORE_ADDR struct_addr) { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -996,7 +996,7 @@ Index: gdb-7.10.50.20151022/gdb/sh64-tdep.c int int_argreg; int float_argreg; int double_argreg; -@@ -1067,7 +1067,7 @@ sh64_push_dummy_call (struct gdbarch *gd +@@ -1067,7 +1067,7 @@ CORE_ADDR regval; const gdb_byte *val; gdb_byte valbuf[8]; @@ -1005,11 +1005,11 @@ Index: gdb-7.10.50.20151022/gdb/sh64-tdep.c int argreg_size; int fp_args[12]; -Index: gdb-7.10.50.20151022/gdb/sparc-tdep.c +Index: gdb-7.10.50.20160106/gdb/sparc-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/sparc-tdep.c 2015-10-24 23:14:17.819039506 +0200 -+++ gdb-7.10.50.20151022/gdb/sparc-tdep.c 2015-10-24 23:14:20.946060277 +0200 -@@ -525,7 +525,7 @@ sparc32_store_arguments (struct regcache +--- gdb-7.10.50.20160106.orig/gdb/sparc-tdep.c 2016-01-08 19:16:16.636814235 +0100 ++++ gdb-7.10.50.20160106/gdb/sparc-tdep.c 2016-01-08 19:16:20.330834840 +0100 +@@ -525,7 +525,7 @@ for (i = 0; i < nargs; i++) { struct type *type = value_type (args[i]); @@ -1018,11 +1018,11 @@ Index: gdb-7.10.50.20151022/gdb/sparc-tdep.c if (sparc_structure_or_union_p (type) || (sparc_floating_p (type) && len == 16) -Index: gdb-7.10.50.20151022/gdb/sparc64-tdep.c +Index: gdb-7.10.50.20160106/gdb/sparc64-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/sparc64-tdep.c 2015-10-24 23:14:17.820039513 +0200 -+++ gdb-7.10.50.20151022/gdb/sparc64-tdep.c 2015-10-24 23:14:20.947060284 +0200 -@@ -636,7 +636,8 @@ sparc64_16_byte_align_p (struct type *ty +--- gdb-7.10.50.20160106.orig/gdb/sparc64-tdep.c 2016-01-08 19:16:16.637814241 +0100 ++++ gdb-7.10.50.20160106/gdb/sparc64-tdep.c 2016-01-08 19:16:20.330834840 +0100 +@@ -636,7 +636,8 @@ static void sparc64_store_floating_fields (struct regcache *regcache, struct type *type, @@ -1032,7 +1032,7 @@ Index: gdb-7.10.50.20151022/gdb/sparc64-tdep.c { int len = TYPE_LENGTH (type); -@@ -678,7 +679,7 @@ sparc64_store_floating_fields (struct re +@@ -678,7 +679,7 @@ for (i = 0; i < TYPE_NFIELDS (type); i++) { struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i)); @@ -1041,7 +1041,7 @@ Index: gdb-7.10.50.20151022/gdb/sparc64-tdep.c sparc64_store_floating_fields (regcache, subtype, valbuf, element, subpos); -@@ -710,7 +711,7 @@ sparc64_store_floating_fields (struct re +@@ -710,7 +711,7 @@ static void sparc64_extract_floating_fields (struct regcache *regcache, struct type *type, @@ -1050,7 +1050,7 @@ Index: gdb-7.10.50.20151022/gdb/sparc64-tdep.c { if (sparc64_floating_p (type)) { -@@ -747,7 +748,7 @@ sparc64_extract_floating_fields (struct +@@ -747,7 +748,7 @@ for (i = 0; i < TYPE_NFIELDS (type); i++) { struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i)); @@ -1059,7 +1059,7 @@ Index: gdb-7.10.50.20151022/gdb/sparc64-tdep.c sparc64_extract_floating_fields (regcache, subtype, valbuf, subpos); } -@@ -780,7 +781,7 @@ sparc64_store_arguments (struct regcache +@@ -780,7 +781,7 @@ for (i = 0; i < nargs; i++) { struct type *type = value_type (args[i]); @@ -1068,7 +1068,7 @@ Index: gdb-7.10.50.20151022/gdb/sparc64-tdep.c if (sparc64_structure_or_union_p (type) || (sparc64_complex_floating_p (type) && len == 32)) -@@ -880,7 +881,7 @@ sparc64_store_arguments (struct regcache +@@ -880,7 +881,7 @@ { const gdb_byte *valbuf = value_contents (args[i]); struct type *type = value_type (args[i]); @@ -1077,11 +1077,11 @@ Index: gdb-7.10.50.20151022/gdb/sparc64-tdep.c int regnum = -1; gdb_byte buf[16]; -Index: gdb-7.10.50.20151022/gdb/spu-tdep.c +Index: gdb-7.10.50.20160106/gdb/spu-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/spu-tdep.c 2015-10-24 23:14:17.821039519 +0200 -+++ gdb-7.10.50.20151022/gdb/spu-tdep.c 2015-10-24 23:14:20.947060284 +0200 -@@ -1429,7 +1429,7 @@ spu_push_dummy_call (struct gdbarch *gdb +--- gdb-7.10.50.20160106.orig/gdb/spu-tdep.c 2016-01-08 19:16:16.638814246 +0100 ++++ gdb-7.10.50.20160106/gdb/spu-tdep.c 2016-01-08 19:16:20.331834845 +0100 +@@ -1429,7 +1429,7 @@ struct value *arg = args[i]; struct type *type = check_typedef (value_type (arg)); const gdb_byte *contents = value_contents (arg); @@ -1090,7 +1090,7 @@ Index: gdb-7.10.50.20151022/gdb/spu-tdep.c /* If the argument doesn't wholly fit into registers, it and all subsequent arguments go to the stack. */ -@@ -1461,7 +1461,7 @@ spu_push_dummy_call (struct gdbarch *gdb +@@ -1461,7 +1461,7 @@ { struct value *arg = args[i]; struct type *type = check_typedef (value_type (arg)); @@ -1099,11 +1099,11 @@ Index: gdb-7.10.50.20151022/gdb/spu-tdep.c int preferred_slot; if (spu_scalar_value_p (type)) -Index: gdb-7.10.50.20151022/gdb/tic6x-tdep.c +Index: gdb-7.10.50.20160106/gdb/tic6x-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/tic6x-tdep.c 2015-10-24 23:14:17.821039519 +0200 -+++ gdb-7.10.50.20151022/gdb/tic6x-tdep.c 2015-10-24 23:14:20.947060284 +0200 -@@ -895,7 +895,7 @@ tic6x_push_dummy_call (struct gdbarch *g +--- gdb-7.10.50.20160106.orig/gdb/tic6x-tdep.c 2016-01-08 19:16:16.639814252 +0100 ++++ gdb-7.10.50.20160106/gdb/tic6x-tdep.c 2016-01-08 19:16:20.332834851 +0100 +@@ -895,7 +895,7 @@ int argreg = 0; int argnum; int stack_offset = 4; @@ -1112,7 +1112,7 @@ Index: gdb-7.10.50.20151022/gdb/tic6x-tdep.c CORE_ADDR func_addr = find_function_addr (function, NULL); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); struct type *func_type = value_type (function); -@@ -929,7 +929,7 @@ tic6x_push_dummy_call (struct gdbarch *g +@@ -929,7 +929,7 @@ /* Now make space on the stack for the args. */ for (argnum = 0; argnum < nargs; argnum++) { @@ -1121,7 +1121,7 @@ Index: gdb-7.10.50.20151022/gdb/tic6x-tdep.c if (argnum >= 10 - argreg) references_offset += len; stack_offset += len; -@@ -948,7 +948,7 @@ tic6x_push_dummy_call (struct gdbarch *g +@@ -948,7 +948,7 @@ const gdb_byte *val; struct value *arg = args[argnum]; struct type *arg_type = check_typedef (value_type (arg)); @@ -1130,7 +1130,7 @@ Index: gdb-7.10.50.20151022/gdb/tic6x-tdep.c enum type_code typecode = TYPE_CODE (arg_type); val = value_contents (arg); -@@ -1108,7 +1108,8 @@ tic6x_push_dummy_call (struct gdbarch *g +@@ -1108,7 +1108,8 @@ } else internal_error (__FILE__, __LINE__, @@ -1140,11 +1140,11 @@ Index: gdb-7.10.50.20151022/gdb/tic6x-tdep.c addr = sp + stack_offset; write_memory (addr, val, len); -Index: gdb-7.10.50.20151022/gdb/tilegx-tdep.c +Index: gdb-7.10.50.20160106/gdb/tilegx-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/tilegx-tdep.c 2015-10-24 23:14:17.822039526 +0200 -+++ gdb-7.10.50.20151022/gdb/tilegx-tdep.c 2015-10-24 23:14:20.947060284 +0200 -@@ -288,7 +288,7 @@ tilegx_push_dummy_call (struct gdbarch * +--- gdb-7.10.50.20160106.orig/gdb/tilegx-tdep.c 2016-01-08 19:16:16.640814257 +0100 ++++ gdb-7.10.50.20160106/gdb/tilegx-tdep.c 2016-01-08 19:16:20.332834851 +0100 +@@ -288,7 +288,7 @@ CORE_ADDR stack_dest = sp; int argreg = TILEGX_R0_REGNUM; int i, j; @@ -1153,11 +1153,11 @@ Index: gdb-7.10.50.20151022/gdb/tilegx-tdep.c static const gdb_byte four_zero_words[16] = { 0 }; /* If struct_return is 1, then the struct return address will -Index: gdb-7.10.50.20151022/gdb/v850-tdep.c +Index: gdb-7.10.50.20160106/gdb/v850-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/v850-tdep.c 2015-10-24 23:14:17.822039526 +0200 -+++ gdb-7.10.50.20151022/gdb/v850-tdep.c 2015-10-24 23:14:20.948060290 +0200 -@@ -1019,7 +1019,7 @@ v850_push_dummy_call (struct gdbarch *gd +--- gdb-7.10.50.20160106.orig/gdb/v850-tdep.c 2016-01-08 19:16:16.640814257 +0100 ++++ gdb-7.10.50.20160106/gdb/v850-tdep.c 2016-01-08 19:16:20.332834851 +0100 +@@ -1019,7 +1019,7 @@ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int argreg; int argnum; @@ -1166,7 +1166,7 @@ Index: gdb-7.10.50.20151022/gdb/v850-tdep.c int stack_offset; if (gdbarch_tdep (gdbarch)->abi == V850_ABI_RH850) -@@ -1047,7 +1047,7 @@ v850_push_dummy_call (struct gdbarch *gd +@@ -1047,7 +1047,7 @@ in four registers available. Loop thru args from first to last. */ for (argnum = 0; argnum < nargs; argnum++) { @@ -1175,11 +1175,11 @@ Index: gdb-7.10.50.20151022/gdb/v850-tdep.c gdb_byte *val; gdb_byte valbuf[v850_reg_size]; -Index: gdb-7.10.50.20151022/gdb/vax-tdep.c +Index: gdb-7.10.50.20160106/gdb/vax-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/vax-tdep.c 2015-10-24 23:14:17.822039526 +0200 -+++ gdb-7.10.50.20151022/gdb/vax-tdep.c 2015-10-24 23:14:20.948060290 +0200 -@@ -111,7 +111,7 @@ vax_store_arguments (struct regcache *re +--- gdb-7.10.50.20160106.orig/gdb/vax-tdep.c 2016-01-08 19:16:16.641814263 +0100 ++++ gdb-7.10.50.20160106/gdb/vax-tdep.c 2016-01-08 19:16:20.333834856 +0100 +@@ -111,7 +111,7 @@ struct gdbarch *gdbarch = get_regcache_arch (regcache); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); gdb_byte buf[4]; @@ -1188,7 +1188,7 @@ Index: gdb-7.10.50.20151022/gdb/vax-tdep.c int i; /* We create an argument list on the stack, and make the argument -@@ -120,7 +120,7 @@ vax_store_arguments (struct regcache *re +@@ -120,7 +120,7 @@ /* Push arguments in reverse order. */ for (i = nargs - 1; i >= 0; i--) { @@ -1197,11 +1197,11 @@ Index: gdb-7.10.50.20151022/gdb/vax-tdep.c sp -= (len + 3) & ~3; count += (len + 3) / 4; -Index: gdb-7.10.50.20151022/gdb/xstormy16-tdep.c +Index: gdb-7.10.50.20160106/gdb/xstormy16-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/xstormy16-tdep.c 2015-10-24 23:14:17.822039526 +0200 -+++ gdb-7.10.50.20151022/gdb/xstormy16-tdep.c 2015-10-24 23:14:20.948060290 +0200 -@@ -233,8 +233,9 @@ xstormy16_push_dummy_call (struct gdbarc +--- gdb-7.10.50.20160106.orig/gdb/xstormy16-tdep.c 2016-01-08 19:16:16.641814263 +0100 ++++ gdb-7.10.50.20160106/gdb/xstormy16-tdep.c 2016-01-08 19:16:20.333834856 +0100 +@@ -233,8 +233,9 @@ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR stack_dest = sp; int argreg = E_1ST_ARG_REGNUM; @@ -1213,11 +1213,11 @@ Index: gdb-7.10.50.20151022/gdb/xstormy16-tdep.c const gdb_byte *val; gdb_byte buf[xstormy16_pc_size]; -Index: gdb-7.10.50.20151022/gdb/xtensa-tdep.c +Index: gdb-7.10.50.20160106/gdb/xtensa-tdep.c =================================================================== ---- gdb-7.10.50.20151022.orig/gdb/xtensa-tdep.c 2015-10-24 23:14:17.824039539 +0200 -+++ gdb-7.10.50.20151022/gdb/xtensa-tdep.c 2015-10-24 23:14:20.948060290 +0200 -@@ -1640,8 +1640,7 @@ xtensa_store_return_value (struct type * +--- gdb-7.10.50.20160106.orig/gdb/xtensa-tdep.c 2016-01-08 19:16:16.643814274 +0100 ++++ gdb-7.10.50.20160106/gdb/xtensa-tdep.c 2016-01-08 19:16:20.334834862 +0100 +@@ -1638,8 +1638,7 @@ if (len > (callsize > 8 ? 8 : 16)) internal_error (__FILE__, __LINE__, @@ -1227,7 +1227,7 @@ Index: gdb-7.10.50.20151022/gdb/xtensa-tdep.c areg = arreg_number (gdbarch, gdbarch_tdep (gdbarch)->a0_base + 2 + callsize, wb); -@@ -1715,18 +1714,18 @@ xtensa_push_dummy_call (struct gdbarch * +@@ -1713,18 +1712,18 @@ { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int i; @@ -1249,7 +1249,7 @@ Index: gdb-7.10.50.20151022/gdb/xtensa-tdep.c int regno; /* regno if in register. */ } u; }; -@@ -1750,9 +1749,10 @@ xtensa_push_dummy_call (struct gdbarch * +@@ -1748,9 +1747,10 @@ { struct value *arg = args[i]; struct type *arg_type = check_typedef (value_type (arg)); @@ -1263,7 +1263,7 @@ Index: gdb-7.10.50.20151022/gdb/xtensa-tdep.c switch (TYPE_CODE (arg_type)) { case TYPE_CODE_INT: -@@ -1822,8 +1822,8 @@ xtensa_push_dummy_call (struct gdbarch * +@@ -1820,8 +1820,8 @@ info->align = TYPE_LENGTH (builtin_type (gdbarch)->builtin_long); break; } @@ -1273,7 +1273,7 @@ Index: gdb-7.10.50.20151022/gdb/xtensa-tdep.c /* Align size and onstack_size. */ size = (size + info->align - 1) & ~(info->align - 1); -@@ -1868,7 +1868,7 @@ xtensa_push_dummy_call (struct gdbarch * +@@ -1866,7 +1866,7 @@ if (info->onstack) { @@ -1282,7 +1282,7 @@ Index: gdb-7.10.50.20151022/gdb/xtensa-tdep.c CORE_ADDR offset = sp + info->u.offset; /* Odd-sized structs are aligned to the lower side of a memory -@@ -1884,7 +1884,7 @@ xtensa_push_dummy_call (struct gdbarch * +@@ -1882,7 +1882,7 @@ } else { diff --git a/gdb-test-bt-cfi-without-die.patch b/gdb-test-bt-cfi-without-die.patch index 82f9d2d..fa3ab58 100644 --- a/gdb-test-bt-cfi-without-die.patch +++ b/gdb-test-bt-cfi-without-die.patch @@ -70,10 +70,10 @@ gdb/testsuite/ create mode 100644 gdb/testsuite/gdb.base/cfi-without-die-main.c create mode 100644 gdb/testsuite/gdb.base/cfi-without-die.exp -Index: gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die-caller.c +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.base/cfi-without-die-caller.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die-caller.c 2014-02-06 19:35:23.485863819 +0100 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.base/cfi-without-die-caller.c 2016-01-08 21:10:15.498079587 +0100 @@ -0,0 +1,28 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -103,10 +103,10 @@ Index: gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die-caller.c + /* Modify the return value to prevent any tail-call optimization. */ + return (*callback) () - one; +} -Index: gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die-main.c +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.base/cfi-without-die-main.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die-main.c 2014-02-06 19:35:23.485863819 +0100 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.base/cfi-without-die-main.c 2016-01-08 21:10:15.498079587 +0100 @@ -0,0 +1,32 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -140,11 +140,11 @@ Index: gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die-main.c +{ + return caller (callback); +} -Index: gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die.exp +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.base/cfi-without-die.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die.exp 2014-02-06 20:26:00.775208847 +0100 -@@ -0,0 +1,67 @@ ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.base/cfi-without-die.exp 2016-01-08 21:13:04.529998009 +0100 +@@ -0,0 +1,71 @@ +# Copyright 2010 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify @@ -186,6 +186,10 @@ Index: gdb-7.7/gdb/testsuite/gdb.base/cfi-without-die.exp +} +set test "verify unwinding breaks without CFI" +gdb_test_multiple "bt" $test { ++ -re " in \[?\]\[?\] .*\r\n$gdb_prompt $" { ++ # It may backtrace through some random frames even to main(). ++ pass $test ++ } + -re " in main .*\r\n$gdb_prompt $" { + fail $test + } diff --git a/gdb-testsuite-foll-vfork.patch b/gdb-testsuite-foll-vfork.patch new file mode 100644 index 0000000..e01343d --- /dev/null +++ b/gdb-testsuite-foll-vfork.patch @@ -0,0 +1,128 @@ +http://sourceware.org/ml/gdb-patches/2016-01/msg00142.html +Subject: [testsuite patch] Regression for foll-vfork.exp [Re: [PATCH] Remove HP-UX reference in foll-vfork.exp] + + +--PEIAKu/WMn1b1Hv9 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline + +On Tue, 22 Dec 2015 16:53:23 +0100, Simon Marchi wrote: +> Thanks, pushed. + +fe33faff35a8ee19db823149e764e3373e603bb9 is the first bad commit +commit fe33faff35a8ee19db823149e764e3373e603bb9 +Author: Simon Marchi +Date: Tue Dec 22 10:52:31 2015 -0500 + Remove HP-UX reference in foll-vfork.exp + +FAIL: gdb.base/foll-vfork.exp: exec: vfork parent follow, finish after tcatch vfork: continue to vfork +FAIL: gdb.base/foll-vfork.exp: exec: vfork child follow, finish after tcatch vfork: continue to vfork +FAIL: gdb.base/foll-vfork.exp: exit: vfork parent follow, finish after tcatch vfork: continue to vfork +FAIL: gdb.base/foll-vfork.exp: exit: vfork child follow, finish after tcatch vfork: continue to vfork + +It happens for plain gdb.base/foll-vfork.exp runtest on Fedora 23 x86_64. + +-Temporary catchpoint 2 (vforked process 24562), vfork () at ../sysdeps/unix/sysv/linux/x86_64/vfork.S:52^M ++Temporary catchpoint 2 (vforked process 25345), vfork () at ../sysdeps/unix/sysv/linux/x86_64/vfork.S:52^M + 52 pushq %rdi^M + Current language: auto^M + The current source language is "auto; currently asm".^M +-(gdb) PASS: gdb.base/foll-vfork.exp: exec: vfork parent follow, finish after tcatch vfork: continue to vfork ++(gdb) FAIL: gdb.base/foll-vfork.exp: exec: vfork parent follow, finish after tcatch vfork: continue to vfork + +-Temporary catchpoint 2 (vforked process 24629), vfork () at ../sysdeps/unix/sysv/linux/x86_64/vfork.S:52^M ++Temporary catchpoint 2 (vforked process 25411), vfork () at ../sysdeps/unix/sysv/linux/x86_64/vfork.S:52^M + 52 pushq %rdi^M + Current language: auto^M + The current source language is "auto; currently asm".^M +-(gdb) PASS: gdb.base/foll-vfork.exp: exec: vfork child follow, finish after tcatch vfork: continue to vfork ++(gdb) FAIL: gdb.base/foll-vfork.exp: exec: vfork child follow, finish after tcatch vfork: continue to vfork + + +So I have reverted it and just simplified the comment, OK for check-in? + +The third case is not necessary during testing but I have changed back all the +3 cases. + + +Jan + +--PEIAKu/WMn1b1Hv9 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline; filename=1 + +gdb/testsuite/ChangeLog +2016-01-08 Jan Kratochvil + + * gdb.base/foll-vfork.exp (tcatch_vfork_then_parent_follow) + (tcatch_vfork_then_child_follow_exec) + (tcatch_vfork_then_child_follow_exit): Revert back DWARF vfork + identification. + +diff --git a/gdb/testsuite/gdb.base/foll-vfork.exp b/gdb/testsuite/gdb.base/foll-vfork.exp +index efa1b39..ebbe4ad 100644 +--- a/gdb/testsuite/gdb.base/foll-vfork.exp ++++ b/gdb/testsuite/gdb.base/foll-vfork.exp +@@ -222,8 +222,17 @@ proc tcatch_vfork_then_parent_follow {} { + gdb_test_no_output "set follow-fork parent" + + gdb_test "tcatch vfork" "Catchpoint .*(vfork).*" +- gdb_test "continue" "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*" \ +- "continue to vfork" ++ ++ # It may stop in either "vfork" or "_vfork". ++ set test "continue to vfork" ++ gdb_test_multiple "continue" $test { ++ -re "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*$gdb_prompt " { ++ pass $test ++ } ++ -re "vfork \\(\\) at.*$gdb_prompt " { ++ pass $test ++ } ++ } + + set linenum [gdb_get_line_number "pid = vfork ();"] + set test "finish" +@@ -254,8 +263,17 @@ proc tcatch_vfork_then_child_follow_exec {} { + gdb_test_no_output "set follow-fork child" + + gdb_test "tcatch vfork" "Catchpoint .*(vfork).*" +- gdb_test "continue" "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*" \ +- "continue to vfork" ++ ++ # It may stop in either "vfork" or "_vfork". ++ set test "continue to vfork" ++ gdb_test_multiple "continue" $test { ++ -re "vfork \\(\\) at .*$gdb_prompt $" { ++ pass $test ++ } ++ -re "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*$gdb_prompt " { ++ pass $test ++ } ++ } + + set linenum1 [gdb_get_line_number "pid = vfork ();"] + set linenum2 [gdb_get_line_number "printf(\"Hello from vforked-prog" ${srcfile2}] +@@ -290,8 +308,17 @@ proc tcatch_vfork_then_child_follow_exit {} { + gdb_test_no_output "set follow-fork child" + + gdb_test "tcatch vfork" "Catchpoint .*(vfork).*" +- gdb_test "continue" "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*" \ +- "continue to vfork" ++ ++ # It may stop in either "vfork" or "_vfork". ++ set test "continue to vfork" ++ gdb_test_multiple "continue" $test { ++ -re "vfork \\(\\) at .*$gdb_prompt $" { ++ pass $test ++ } ++ -re "0x\[0-9a-fA-F\]*.*(vfork|__kernel_v?syscall).*$gdb_prompt " { ++ pass $test ++ } ++ } + + set test "finish" + gdb_test_multiple "finish" $test { + +--PEIAKu/WMn1b1Hv9-- + diff --git a/gdb-testsuite-funcargs-m32.patch b/gdb-testsuite-funcargs-m32.patch new file mode 100644 index 0000000..5a268d8 --- /dev/null +++ b/gdb-testsuite-funcargs-m32.patch @@ -0,0 +1,88 @@ +http://sourceware.org/ml/gdb-patches/2016-01/msg00140.html +Subject: [testsuite patch] i386 regression for funcargs.exp [Re: [PATCH 3/3] Remove HP-UX references fom testsuite] + + +--EeQfGwPcQSOJBaQU +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline + +On Mon, 21 Dec 2015 18:52:59 +0100, Simon Marchi wrote: +> Ok, I pushed this one in. Thanks! + +3ca22649a6dfeb71058c33be4d0542b98f1f0ff5 is the first bad commit +commit 3ca22649a6dfeb71058c33be4d0542b98f1f0ff5 +Author: Simon Marchi +Date: Mon Dec 21 12:51:54 2015 -0500 + Remove HP-UX references fom testsuite +### a/gdb/testsuite/gdb.base/funcargs.exp +### b/gdb/testsuite/gdb.base/funcargs.exp +@@ -1013,13 +1013,6 @@ proc localvars_in_indirect_call { } { + # + + gdb_test_multiple "finish" "finish from indirectly called function" { +- -re "\\(\\*pointer_to_call0a\\) \\(c, s, i, l\\);.*First.*$gdb_prompt $" { +- #On hppa2.0w-hp-hpux11.00, gdb finishes at one line earlier than +- #hppa1.1-hp-hpux11.00. Therefore, an extra "step" is necessary +- #to continue the test. +- send_gdb "step\n" +- exp_continue +- } + -re ".*\\(\\*pointer_to_call0a\\) \\(c, s, i, l\\);.*Second.*$gdb_prompt $" { + pass "finish from indirectly called function" + } + +-> + + finish^M + Run till exit from #0 call0a (c=97 'a', s=1, i=2, l=3) at ./gdb.base/funcargs.c:82^M + 0x0804a189 in main () at ./gdb.base/funcargs.c:583^M + 583 (*pointer_to_call0a) (c, s, i, l); /* First step into call0a. */^M +-(gdb) step^M +-584 (*pointer_to_call0a) (c, s, i, l); /* Second step into call0a. */^M +-(gdb) PASS: gdb.base/funcargs.exp: finish from indirectly called function ++(gdb) FAIL: gdb.base/funcargs.exp: finish from indirectly called function + step^M +-call0a (c=97 'a', s=1, i=2, l=3) at ./gdb.base/funcargs.c:82^M +-82 c = 'a';^M +-(gdb) PASS: gdb.base/funcargs.exp: stepping into indirectly called function ++584 (*pointer_to_call0a) (c, s, i, l); /* Second step into call0a. */^M ++(gdb) FAIL: gdb.base/funcargs.exp: stepping into indirectly called function + +At least on x86_64 with testsuite in -m32 (expecting native i386 would be the +same). + +OK for check-in? + + +Jan + +--EeQfGwPcQSOJBaQU +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline; filename=1 + +gdb/testsuite/ChangeLog +2016-01-08 Jan Kratochvil + + * gdb.base/funcargs.exp (finish from indirectly called function): + Reintroduce the case for 'First'. + +diff --git a/gdb/testsuite/gdb.base/funcargs.exp b/gdb/testsuite/gdb.base/funcargs.exp +index e5b6ced..a476169 100644 +--- a/gdb/testsuite/gdb.base/funcargs.exp ++++ b/gdb/testsuite/gdb.base/funcargs.exp +@@ -1013,6 +1013,12 @@ proc localvars_in_indirect_call { } { + # + + gdb_test_multiple "finish" "finish from indirectly called function" { ++ -re "\\(\\*pointer_to_call0a\\) \\(c, s, i, l\\);.*First.*$gdb_prompt $" { ++ # On i386, gdb finishes at one line earlier than on x86_64. ++ # Therefore, an extra "step" is necessary to continue the test. ++ send_gdb "step\n" ++ exp_continue ++ } + -re ".*\\(\\*pointer_to_call0a\\) \\(c, s, i, l\\);.*Second.*$gdb_prompt $" { + pass "finish from indirectly called function" + } + +--EeQfGwPcQSOJBaQU-- + diff --git a/gdb-testsuite-multi-base-warnings.patch b/gdb-testsuite-multi-base-warnings.patch new file mode 100644 index 0000000..b261ed2 --- /dev/null +++ b/gdb-testsuite-multi-base-warnings.patch @@ -0,0 +1,141 @@ +http://sourceware.org/ml/gdb-patches/2016-01/msg00137.html +Subject: [testsuite patch] Fix gdb.multi/base.exp testsuite regression [Re: [ob/pushed] Stop using nowarnings in gdb/testsuite/gdb.multi/] + + +--fdj2RfSjLxBAspz7 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline + +On Thu, 10 Dec 2015 17:31:11 +0100, Pedro Alves wrote: +> Several of the gdb.multi tests use the "nowarnings" option to suppress +> warnings. + +commit 762f774785f4ef878ac4c831e1f4733dc957234d +Author: Pedro Alves +Date: Thu Dec 10 16:21:06 2015 +0000 + Stop using nowarnings in gdb/testsuite/gdb.multi/ + ++gdb compile failed, gdb/testsuite/gdb.multi/hello.c: In function 'commonfun': ++gdb/testsuite/gdb.multi/hello.c:24:19: warning: implicit declaration of function 'bar' [-Wimplicit-function-declaration] ++ int commonfun() { bar(); } /* from hello */ ++ ^ ++gdb/testsuite/gdb.multi/hello.c: At top level: ++gdb/testsuite/gdb.multi/hello.c:26:1: warning: return type defaults to 'int' [-Wimplicit-int] ++ bar() ++ ^ ++gdb/testsuite/gdb.multi/hello.c:32:1: warning: return type defaults to 'int' [-Wimplicit-int] ++ hello(int x) ++ ^ ++gdb/testsuite/gdb.multi/hello.c:38:1: warning: return type defaults to 'int' [-Wimplicit-int] ++ main() ++ ^ ++UNTESTED: gdb.multi/base.exp: base.exp + + +OK for check-in? + + +Jan + +--fdj2RfSjLxBAspz7 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline; filename=1 + +gdb/testsuite/ChangeLog +2016-01-08 Jan Kratochvil + + * gdb.multi/goodbye.c: Fix compilation warnings by adding return types + and reordering the functions. + * gdb.multi/hangout.c: Likewise. + * gdb.multi/hello.c: Likewise. + +diff --git a/gdb/testsuite/gdb.multi/goodbye.c b/gdb/testsuite/gdb.multi/goodbye.c +index 701e504..bf7759a 100644 +--- a/gdb/testsuite/gdb.multi/goodbye.c ++++ b/gdb/testsuite/gdb.multi/goodbye.c +@@ -39,24 +39,28 @@ int verylongfun() + glob *= 9; + } + +-main() { +- mailand(); +- foo(glob); +- verylongfun(); +- goodbye(); +-} +- +-foo(int x) { +- return x + 92; +-} +- ++void + mailand() + { + glob = 46; + } + +-void commonfun() { mailand(); } /* from goodbye */ ++int ++foo(int x) { ++ return x + 92; ++} + ++void + goodbye() { + ++glob; + } ++ ++int ++main() { ++ mailand(); ++ foo(glob); ++ verylongfun(); ++ goodbye(); ++} ++ ++void commonfun() { mailand(); } /* from goodbye */ +diff --git a/gdb/testsuite/gdb.multi/hangout.c b/gdb/testsuite/gdb.multi/hangout.c +index e2c41b8..3701512 100644 +--- a/gdb/testsuite/gdb.multi/hangout.c ++++ b/gdb/testsuite/gdb.multi/hangout.c +@@ -17,6 +17,7 @@ + + #include + ++int + main(int argc, char *argv[]) + { + int i; +diff --git a/gdb/testsuite/gdb.multi/hello.c b/gdb/testsuite/gdb.multi/hello.c +index efff59d..93d921f 100644 +--- a/gdb/testsuite/gdb.multi/hello.c ++++ b/gdb/testsuite/gdb.multi/hello.c +@@ -21,20 +21,23 @@ short hglob = 1; + + short glob = 92; + +-int commonfun() { bar(); } /* from hello */ +- ++void + bar() + { + if (glob == 0) + exit(1); + } + ++int commonfun() { bar(); } /* from hello */ ++ ++int + hello(int x) + { + x *= 2; + return x + 45; + } + ++int + main() + { + int tmpx; + +--fdj2RfSjLxBAspz7-- + diff --git a/gdb-vla-intel.patch b/gdb-vla-intel.patch index 3361585..925f401 100644 --- a/gdb-vla-intel.patch +++ b/gdb-vla-intel.patch @@ -6,11 +6,11 @@ GIT snapshot: commit 511bff520372ffc10fa2ff569c176bdf1e6e475d -Index: gdb-7.10.50.20151027/gdb/c-valprint.c +Index: gdb-7.10.50.20160106/gdb/c-valprint.c =================================================================== ---- gdb-7.10.50.20151027.orig/gdb/c-valprint.c 2015-10-27 02:48:31.000000000 +0100 -+++ gdb-7.10.50.20151027/gdb/c-valprint.c 2015-11-03 21:13:35.959339113 +0100 -@@ -642,7 +642,16 @@ c_value_print (struct value *val, struct +--- gdb-7.10.50.20160106.orig/gdb/c-valprint.c 2016-01-08 19:15:35.065582359 +0100 ++++ gdb-7.10.50.20160106/gdb/c-valprint.c 2016-01-08 19:15:44.974637630 +0100 +@@ -642,7 +642,16 @@ { /* normal case */ fprintf_filtered (stream, "("); @@ -28,11 +28,11 @@ Index: gdb-7.10.50.20151027/gdb/c-valprint.c fprintf_filtered (stream, ") "); } } -Index: gdb-7.10.50.20151027/gdb/dwarf2loc.h +Index: gdb-7.10.50.20160106/gdb/dwarf2loc.h =================================================================== ---- gdb-7.10.50.20151027.orig/gdb/dwarf2loc.h 2015-10-27 02:48:31.000000000 +0100 -+++ gdb-7.10.50.20151027/gdb/dwarf2loc.h 2015-11-03 20:41:48.533504941 +0100 -@@ -138,6 +138,11 @@ int dwarf2_evaluate_property (const stru +--- gdb-7.10.50.20160106.orig/gdb/dwarf2loc.h 2016-01-08 19:15:35.066582365 +0100 ++++ gdb-7.10.50.20160106/gdb/dwarf2loc.h 2016-01-08 19:15:44.974637630 +0100 +@@ -138,6 +138,11 @@ struct property_addr_info *addr_stack, CORE_ADDR *value); @@ -44,11 +44,11 @@ Index: gdb-7.10.50.20151027/gdb/dwarf2loc.h /* A helper for the compiler interface that compiles a single dynamic property to C code. -Index: gdb-7.10.50.20151027/gdb/dwarf2read.c +Index: gdb-7.10.50.20160106/gdb/dwarf2read.c =================================================================== ---- gdb-7.10.50.20151027.orig/gdb/dwarf2read.c 2015-10-27 02:48:31.000000000 +0100 -+++ gdb-7.10.50.20151027/gdb/dwarf2read.c 2015-11-03 21:13:38.216349800 +0100 -@@ -1745,7 +1745,9 @@ static void read_signatured_type (struct +--- gdb-7.10.50.20160106.orig/gdb/dwarf2read.c 2016-01-08 19:15:35.078582432 +0100 ++++ gdb-7.10.50.20160106/gdb/dwarf2read.c 2016-01-08 19:15:44.980637663 +0100 +@@ -1745,7 +1745,9 @@ static int attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, struct dwarf2_cu *cu, @@ -59,7 +59,7 @@ Index: gdb-7.10.50.20151027/gdb/dwarf2read.c /* memory allocation interface */ -@@ -11420,7 +11422,7 @@ read_func_scope (struct die_info *die, s +@@ -11420,7 +11422,7 @@ { newobj->static_link = XOBNEW (&objfile->objfile_obstack, struct dynamic_prop); @@ -68,7 +68,7 @@ Index: gdb-7.10.50.20151027/gdb/dwarf2read.c } cu->list_in_scope = &local_symbols; -@@ -14471,29 +14473,92 @@ read_tag_string_type (struct die_info *d +@@ -14471,29 +14473,92 @@ struct gdbarch *gdbarch = get_objfile_arch (objfile); struct type *type, *range_type, *index_type, *char_type; struct attribute *attr; @@ -168,7 +168,7 @@ Index: gdb-7.10.50.20151027/gdb/dwarf2read.c char_type = language_string_char_type (cu->language_defn, gdbarch); type = create_string_type (NULL, char_type, range_type); -@@ -14816,13 +14881,15 @@ read_base_type (struct die_info *die, st +@@ -14816,13 +14881,15 @@ return set_die_type (die, type, cu); } @@ -185,7 +185,7 @@ Index: gdb-7.10.50.20151027/gdb/dwarf2read.c { struct dwarf2_property_baton *baton; struct obstack *obstack = &cu->objfile->objfile_obstack; -@@ -14835,8 +14902,25 @@ attr_to_dynamic_prop (const struct attri +@@ -14835,8 +14902,25 @@ baton = XOBNEW (obstack, struct dwarf2_property_baton); baton->referenced_type = NULL; baton->locexpr.per_cu = cu->per_cu; @@ -213,7 +213,7 @@ Index: gdb-7.10.50.20151027/gdb/dwarf2read.c prop->data.baton = baton; prop->kind = PROP_LOCEXPR; gdb_assert (prop->data.baton != NULL); -@@ -14872,8 +14956,28 @@ attr_to_dynamic_prop (const struct attri +@@ -14872,8 +14956,28 @@ baton = XOBNEW (obstack, struct dwarf2_property_baton); baton->referenced_type = die_type (target_die, target_cu); baton->locexpr.per_cu = cu->per_cu; @@ -244,7 +244,7 @@ Index: gdb-7.10.50.20151027/gdb/dwarf2read.c prop->data.baton = baton; prop->kind = PROP_LOCEXPR; gdb_assert (prop->data.baton != NULL); -@@ -14927,7 +15031,7 @@ read_subrange_type (struct die_info *die +@@ -14927,7 +15031,7 @@ struct type *base_type, *orig_base_type; struct type *range_type; struct attribute *attr; @@ -253,7 +253,7 @@ Index: gdb-7.10.50.20151027/gdb/dwarf2read.c int low_default_is_valid; int high_bound_is_count = 0; const char *name; -@@ -14947,7 +15051,9 @@ read_subrange_type (struct die_info *die +@@ -14947,7 +15051,9 @@ low.kind = PROP_CONST; high.kind = PROP_CONST; @@ -263,7 +263,7 @@ Index: gdb-7.10.50.20151027/gdb/dwarf2read.c /* Set LOW_DEFAULT_IS_VALID if current language and DWARF version allow omitting DW_AT_lower_bound. */ -@@ -14980,19 +15086,26 @@ read_subrange_type (struct die_info *die +@@ -14980,19 +15086,26 @@ break; } @@ -293,7 +293,7 @@ Index: gdb-7.10.50.20151027/gdb/dwarf2read.c { /* If bounds are constant do the final calculation here. */ if (low.kind == PROP_CONST && high.kind == PROP_CONST) -@@ -15056,7 +15169,7 @@ read_subrange_type (struct die_info *die +@@ -15056,7 +15169,7 @@ && !TYPE_UNSIGNED (base_type) && (high.data.const_val & negative_mask)) high.data.const_val |= negative_mask; @@ -302,7 +302,7 @@ Index: gdb-7.10.50.20151027/gdb/dwarf2read.c if (high_bound_is_count) TYPE_RANGE_DATA (range_type)->flag_upper_bound_is_count = 1; -@@ -22360,7 +22473,7 @@ set_die_type (struct die_info *die, stru +@@ -22360,7 +22473,7 @@ attr = dwarf2_attr (die, DW_AT_allocated, cu); if (attr_form_is_block (attr)) { @@ -311,7 +311,7 @@ Index: gdb-7.10.50.20151027/gdb/dwarf2read.c add_dyn_prop (DYN_PROP_ALLOCATED, prop, type, objfile); } else if (attr != NULL) -@@ -22375,7 +22488,7 @@ set_die_type (struct die_info *die, stru +@@ -22375,7 +22488,7 @@ attr = dwarf2_attr (die, DW_AT_associated, cu); if (attr_form_is_block (attr)) { @@ -320,7 +320,7 @@ Index: gdb-7.10.50.20151027/gdb/dwarf2read.c add_dyn_prop (DYN_PROP_ASSOCIATED, prop, type, objfile); } else if (attr != NULL) -@@ -22388,7 +22501,7 @@ set_die_type (struct die_info *die, stru +@@ -22388,7 +22501,7 @@ /* Read DW_AT_data_location and set in type. */ attr = dwarf2_attr (die, DW_AT_data_location, cu); @@ -329,10 +329,10 @@ Index: gdb-7.10.50.20151027/gdb/dwarf2read.c add_dyn_prop (DYN_PROP_DATA_LOCATION, prop, type, objfile); if (dwarf2_per_objfile->die_type_hash == NULL) -Index: gdb-7.10.50.20151027/gdb/f-typeprint.c +Index: gdb-7.10.50.20160106/gdb/f-typeprint.c =================================================================== ---- gdb-7.10.50.20151027.orig/gdb/f-typeprint.c 2015-10-27 02:48:31.000000000 +0100 -+++ gdb-7.10.50.20151027/gdb/f-typeprint.c 2015-11-03 21:13:35.707337920 +0100 +--- gdb-7.10.50.20160106.orig/gdb/f-typeprint.c 2016-01-08 19:15:35.080582443 +0100 ++++ gdb-7.10.50.20160106/gdb/f-typeprint.c 2016-01-08 19:15:44.980637663 +0100 @@ -31,6 +31,7 @@ #include "target.h" #include "f-lang.h" @@ -341,7 +341,7 @@ Index: gdb-7.10.50.20151027/gdb/f-typeprint.c #if 0 /* Currently unused. */ static void f_type_print_args (struct type *, struct ui_file *); -@@ -64,6 +65,17 @@ f_print_type (struct type *type, const c +@@ -64,6 +65,17 @@ { val_print_not_allocated (stream); return; @@ -359,10 +359,10 @@ Index: gdb-7.10.50.20151027/gdb/f-typeprint.c } f_type_print_base (type, stream, show, level); -Index: gdb-7.10.50.20151027/gdb/f-valprint.c +Index: gdb-7.10.50.20160106/gdb/f-valprint.c =================================================================== ---- gdb-7.10.50.20151027.orig/gdb/f-valprint.c 2015-10-27 02:48:31.000000000 +0100 -+++ gdb-7.10.50.20151027/gdb/f-valprint.c 2015-11-03 21:13:35.959339113 +0100 +--- gdb-7.10.50.20160106.orig/gdb/f-valprint.c 2016-01-08 19:15:35.081582448 +0100 ++++ gdb-7.10.50.20160106/gdb/f-valprint.c 2016-01-08 19:15:44.981637669 +0100 @@ -36,8 +36,6 @@ extern void _initialize_f_valprint (void); @@ -372,7 +372,7 @@ Index: gdb-7.10.50.20151027/gdb/f-valprint.c static void f77_get_dynamic_length_of_aggregate (struct type *); int f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2]; -@@ -45,15 +43,6 @@ int f77_array_offset_tbl[MAX_FORTRAN_DIM +@@ -45,15 +43,6 @@ /* Array which holds offsets to be applied to get a row's elements for a given array. Array also holds the size of each subarray. */ @@ -388,7 +388,7 @@ Index: gdb-7.10.50.20151027/gdb/f-valprint.c int f77_get_lowerbound (struct type *type) { -@@ -111,47 +100,6 @@ f77_get_dynamic_length_of_aggregate (str +@@ -111,47 +100,6 @@ * TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type))); } @@ -436,7 +436,7 @@ Index: gdb-7.10.50.20151027/gdb/f-valprint.c /* Actual function which prints out F77 arrays, Valaddr == address in the superior. Address == the address in the inferior. */ -@@ -164,41 +112,62 @@ f77_print_array_1 (int nss, int ndimensi +@@ -164,41 +112,62 @@ const struct value_print_options *options, int *elts) { @@ -515,7 +515,7 @@ Index: gdb-7.10.50.20151027/gdb/f-valprint.c fprintf_filtered (stream, "..."); } } -@@ -225,12 +194,6 @@ f77_print_array (struct type *type, cons +@@ -225,12 +194,6 @@ Type node corrupt! F77 arrays cannot have %d subscripts (%d Max)"), ndimensions, MAX_FORTRAN_DIMS); @@ -528,7 +528,7 @@ Index: gdb-7.10.50.20151027/gdb/f-valprint.c f77_print_array_1 (1, ndimensions, type, valaddr, embedded_offset, address, stream, recurse, val, options, &elts); } -@@ -375,12 +338,15 @@ f_val_print (struct type *type, const gd +@@ -375,12 +338,15 @@ fprintf_filtered (stream, "( "); for (index = 0; index < TYPE_NFIELDS (type); index++) { @@ -549,11 +549,11 @@ Index: gdb-7.10.50.20151027/gdb/f-valprint.c if (index != TYPE_NFIELDS (type) - 1) fputs_filtered (", ", stream); } -Index: gdb-7.10.50.20151027/gdb/gdbtypes.c +Index: gdb-7.10.50.20160106/gdb/gdbtypes.c =================================================================== ---- gdb-7.10.50.20151027.orig/gdb/gdbtypes.c 2015-10-27 02:48:31.000000000 +0100 -+++ gdb-7.10.50.20151027/gdb/gdbtypes.c 2015-11-03 21:13:38.683352011 +0100 -@@ -836,7 +836,8 @@ allocate_stub_method (struct type *type) +--- gdb-7.10.50.20160106.orig/gdb/gdbtypes.c 2016-01-08 19:15:35.083582459 +0100 ++++ gdb-7.10.50.20160106/gdb/gdbtypes.c 2016-01-08 19:15:44.982637674 +0100 +@@ -836,7 +836,8 @@ struct type * create_range_type (struct type *result_type, struct type *index_type, const struct dynamic_prop *low_bound, @@ -563,7 +563,7 @@ Index: gdb-7.10.50.20151027/gdb/gdbtypes.c { if (result_type == NULL) result_type = alloc_type_copy (index_type); -@@ -851,6 +852,7 @@ create_range_type (struct type *result_t +@@ -851,6 +852,7 @@ TYPE_ZALLOC (result_type, sizeof (struct range_bounds)); TYPE_RANGE_DATA (result_type)->low = *low_bound; TYPE_RANGE_DATA (result_type)->high = *high_bound; @@ -571,7 +571,7 @@ Index: gdb-7.10.50.20151027/gdb/gdbtypes.c if (low_bound->kind == PROP_CONST && low_bound->data.const_val >= 0) TYPE_UNSIGNED (result_type) = 1; -@@ -879,7 +881,7 @@ struct type * +@@ -879,7 +881,7 @@ create_static_range_type (struct type *result_type, struct type *index_type, LONGEST low_bound, LONGEST high_bound) { @@ -580,7 +580,7 @@ Index: gdb-7.10.50.20151027/gdb/gdbtypes.c low.kind = PROP_CONST; low.data.const_val = low_bound; -@@ -887,7 +889,11 @@ create_static_range_type (struct type *r +@@ -887,7 +889,11 @@ high.kind = PROP_CONST; high.data.const_val = high_bound; @@ -593,9 +593,9 @@ Index: gdb-7.10.50.20151027/gdb/gdbtypes.c return result_type; } -@@ -1084,16 +1090,21 @@ create_array_type_with_stride (struct ty - && (!type_not_associated (result_type) - && !type_not_allocated (result_type))) +@@ -1084,16 +1090,21 @@ + && (!type_not_associated (result_type) + && !type_not_allocated (result_type))) { - LONGEST low_bound, high_bound; + LONGEST low_bound, high_bound, byte_stride; @@ -616,7 +616,7 @@ Index: gdb-7.10.50.20151027/gdb/gdbtypes.c else if (bit_stride > 0) TYPE_LENGTH (result_type) = (bit_stride * (high_bound - low_bound + 1) + 7) / 8; -@@ -1804,12 +1815,31 @@ stub_noname_complaint (void) +@@ -1804,12 +1815,31 @@ static int is_dynamic_type_internal (struct type *type, int top_level) { @@ -648,7 +648,7 @@ Index: gdb-7.10.50.20151027/gdb/gdbtypes.c /* Types that have a dynamic TYPE_DATA_LOCATION are considered dynamic, even if the type itself is statically defined. From a user's point of view, this may appear counter-intuitive; -@@ -1844,11 +1874,19 @@ is_dynamic_type_internal (struct type *t +@@ -1844,11 +1874,19 @@ { gdb_assert (TYPE_NFIELDS (type) == 1); @@ -671,7 +671,7 @@ Index: gdb-7.10.50.20151027/gdb/gdbtypes.c } case TYPE_CODE_STRUCT: -@@ -1861,6 +1899,18 @@ is_dynamic_type_internal (struct type *t +@@ -1861,6 +1899,18 @@ && is_dynamic_type_internal (TYPE_FIELD_TYPE (type, i), 0)) return 1; } @@ -690,7 +690,7 @@ Index: gdb-7.10.50.20151027/gdb/gdbtypes.c break; } -@@ -1890,7 +1940,8 @@ resolve_dynamic_range (struct type *dyn_ +@@ -1890,7 +1940,8 @@ struct type *static_range_type, *static_target_type; const struct dynamic_prop *prop; const struct dwarf2_locexpr_baton *baton; @@ -700,7 +700,7 @@ Index: gdb-7.10.50.20151027/gdb/gdbtypes.c gdb_assert (TYPE_CODE (dyn_range_type) == TYPE_CODE_RANGE); -@@ -1922,12 +1973,19 @@ resolve_dynamic_range (struct type *dyn_ +@@ -1922,12 +1973,19 @@ high_bound.data.const_val = 0; } @@ -723,7 +723,7 @@ Index: gdb-7.10.50.20151027/gdb/gdbtypes.c TYPE_RANGE_DATA (static_range_type)->flag_bound_evaluated = 1; return static_range_type; } -@@ -1946,7 +2004,8 @@ resolve_dynamic_array (struct type *type +@@ -1946,7 +2004,8 @@ struct type *ary_dim; struct dynamic_prop *prop; @@ -733,7 +733,7 @@ Index: gdb-7.10.50.20151027/gdb/gdbtypes.c type = copy_type (type); -@@ -1971,13 +2030,18 @@ resolve_dynamic_array (struct type *type +@@ -1971,13 +2030,18 @@ ary_dim = check_typedef (TYPE_TARGET_TYPE (elt_type)); @@ -755,7 +755,7 @@ Index: gdb-7.10.50.20151027/gdb/gdbtypes.c } /* Resolve dynamic bounds of members of the union TYPE to static -@@ -4558,6 +4622,17 @@ copy_type_recursive (struct objfile *obj +@@ -4558,6 +4622,17 @@ gdb_assert_not_reached ("bad type_specific_kind"); } @@ -773,11 +773,11 @@ Index: gdb-7.10.50.20151027/gdb/gdbtypes.c return new_type; } -Index: gdb-7.10.50.20151027/gdb/gdbtypes.h +Index: gdb-7.10.50.20160106/gdb/gdbtypes.h =================================================================== ---- gdb-7.10.50.20151027.orig/gdb/gdbtypes.h 2015-10-27 02:48:31.000000000 +0100 -+++ gdb-7.10.50.20151027/gdb/gdbtypes.h 2015-11-03 21:13:36.760342906 +0100 -@@ -577,6 +577,10 @@ struct range_bounds +--- gdb-7.10.50.20160106.orig/gdb/gdbtypes.h 2016-01-08 19:15:35.085582471 +0100 ++++ gdb-7.10.50.20160106/gdb/gdbtypes.h 2016-01-08 19:15:44.983637680 +0100 +@@ -577,6 +577,10 @@ struct dynamic_prop high; @@ -788,7 +788,7 @@ Index: gdb-7.10.50.20151027/gdb/gdbtypes.h /* True if HIGH range bound contains the number of elements in the subrange. This affects how the final hight bound is computed. */ -@@ -749,6 +753,18 @@ struct main_type +@@ -749,6 +753,18 @@ /* * Contains all dynamic type properties. */ struct dynamic_prop_list *dyn_prop_list; @@ -807,7 +807,7 @@ Index: gdb-7.10.50.20151027/gdb/gdbtypes.h }; /* * A ``struct type'' describes a particular instance of a type, with -@@ -1255,6 +1271,15 @@ extern void allocate_gnat_aux_type (stru +@@ -1255,6 +1271,15 @@ TYPE_RANGE_DATA(range_type)->high.kind #define TYPE_LOW_BOUND_KIND(range_type) \ TYPE_RANGE_DATA(range_type)->low.kind @@ -823,7 +823,7 @@ Index: gdb-7.10.50.20151027/gdb/gdbtypes.h /* Property accessors for the type data location. */ #define TYPE_DATA_LOCATION(thistype) \ -@@ -1266,6 +1291,18 @@ extern void allocate_gnat_aux_type (stru +@@ -1266,6 +1291,18 @@ #define TYPE_DATA_LOCATION_KIND(thistype) \ TYPE_DATA_LOCATION (thistype)->kind @@ -842,7 +842,7 @@ Index: gdb-7.10.50.20151027/gdb/gdbtypes.h /* Property accessors for the type allocated/associated. */ #define TYPE_ALLOCATED_PROP(thistype) \ get_dyn_prop (DYN_PROP_ALLOCATED, thistype) -@@ -1289,6 +1326,9 @@ extern void allocate_gnat_aux_type (stru +@@ -1289,6 +1326,9 @@ TYPE_HIGH_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype)) #define TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED(arraytype) \ TYPE_LOW_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype)) @@ -852,7 +852,7 @@ Index: gdb-7.10.50.20151027/gdb/gdbtypes.h #define TYPE_ARRAY_UPPER_BOUND_VALUE(arraytype) \ (TYPE_HIGH_BOUND(TYPE_INDEX_TYPE((arraytype)))) -@@ -1775,6 +1815,7 @@ extern struct type *create_array_type_wi +@@ -1775,6 +1815,7 @@ extern struct type *create_range_type (struct type *, struct type *, const struct dynamic_prop *, @@ -860,10 +860,10 @@ Index: gdb-7.10.50.20151027/gdb/gdbtypes.h const struct dynamic_prop *); extern struct type *create_array_type (struct type *, struct type *, -Index: gdb-7.10.50.20151027/gdb/testsuite/gdb.fortran/vla-func.exp +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-func.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.10.50.20151027/gdb/testsuite/gdb.fortran/vla-func.exp 2015-11-03 20:41:48.542504993 +0100 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-func.exp 2016-01-08 19:15:44.983637680 +0100 @@ -0,0 +1,61 @@ +# Copyright 2014 Free Software Foundation, Inc. + @@ -926,10 +926,10 @@ Index: gdb-7.10.50.20151027/gdb/testsuite/gdb.fortran/vla-func.exp + "print vla3 (after func2)" +gdb_test "ptype vla3" "type = integer\\\(kind=4\\\) \\\(10\\\)" \ + "ptype vla3 (after func2)" -Index: gdb-7.10.50.20151027/gdb/testsuite/gdb.fortran/vla-func.f90 +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-func.f90 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.10.50.20151027/gdb/testsuite/gdb.fortran/vla-func.f90 2015-11-03 20:41:48.542504993 +0100 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-func.f90 2016-01-08 19:15:44.983637680 +0100 @@ -0,0 +1,71 @@ +! Copyright 2014 Free Software Foundation, Inc. +! @@ -1002,10 +1002,10 @@ Index: gdb-7.10.50.20151027/gdb/testsuite/gdb.fortran/vla-func.f90 + + ret = .TRUE. ! func2-returned +end program vla_func -Index: gdb-7.10.50.20151027/gdb/testsuite/gdb.fortran/vla-stride.exp +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-stride.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.10.50.20151027/gdb/testsuite/gdb.fortran/vla-stride.exp 2015-11-03 20:41:48.542504993 +0100 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-stride.exp 2016-01-08 19:15:44.984637686 +0100 @@ -0,0 +1,44 @@ +# Copyright 2014 Free Software Foundation, Inc. + @@ -1051,10 +1051,10 @@ Index: gdb-7.10.50.20151027/gdb/testsuite/gdb.fortran/vla-stride.exp +gdb_continue_to_breakpoint "single-element" +gdb_test "print pvla" " = \\\(5\\\)" "print single-element" +gdb_test "print pvla(1)" " = 5" "print one single-element" -Index: gdb-7.10.50.20151027/gdb/testsuite/gdb.fortran/vla-stride.f90 +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-stride.f90 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.10.50.20151027/gdb/testsuite/gdb.fortran/vla-stride.f90 2015-11-03 20:41:48.543504999 +0100 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-stride.f90 2016-01-08 19:15:44.984637686 +0100 @@ -0,0 +1,30 @@ +! Copyright 2014 Free Software Foundation, Inc. +! @@ -1086,10 +1086,10 @@ Index: gdb-7.10.50.20151027/gdb/testsuite/gdb.fortran/vla-stride.f90 + + pvla => null() ! single-element +end program vla_stride -Index: gdb-7.10.50.20151027/gdb/testsuite/gdb.fortran/vla-strings.exp +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-strings.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.10.50.20151027/gdb/testsuite/gdb.fortran/vla-strings.exp 2015-11-03 21:13:45.863386007 +0100 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-strings.exp 2016-01-08 19:15:44.984637686 +0100 @@ -0,0 +1,101 @@ +# Copyright 2014 Free Software Foundation, Inc. + @@ -1192,10 +1192,10 @@ Index: gdb-7.10.50.20151027/gdb/testsuite/gdb.fortran/vla-strings.exp + "whatis var_char_p after associated" +gdb_test "ptype var_char_p" "type = PTR TO -> \\( character\\*7 \\)" \ + "ptype var_char_p after associated" -Index: gdb-7.10.50.20151027/gdb/testsuite/gdb.fortran/vla-strings.f90 +Index: gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-strings.f90 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.10.50.20151027/gdb/testsuite/gdb.fortran/vla-strings.f90 2015-11-03 20:41:48.543504999 +0100 ++++ gdb-7.10.50.20160106/gdb/testsuite/gdb.fortran/vla-strings.f90 2016-01-08 19:15:44.984637686 +0100 @@ -0,0 +1,40 @@ +! Copyright 2014 Free Software Foundation, Inc. +! @@ -1237,11 +1237,11 @@ Index: gdb-7.10.50.20151027/gdb/testsuite/gdb.fortran/vla-strings.f90 + var_char_p => null() + l = associated(var_char_p) ! var_char_p-not-associated +end program vla_strings -Index: gdb-7.10.50.20151027/gdb/typeprint.c +Index: gdb-7.10.50.20160106/gdb/typeprint.c =================================================================== ---- gdb-7.10.50.20151027.orig/gdb/typeprint.c 2015-10-27 02:48:32.000000000 +0100 -+++ gdb-7.10.50.20151027/gdb/typeprint.c 2015-11-03 21:13:35.959339113 +0100 -@@ -460,6 +460,13 @@ whatis_exp (char *exp, int show) +--- gdb-7.10.50.20160106.orig/gdb/typeprint.c 2016-01-08 19:15:35.086582476 +0100 ++++ gdb-7.10.50.20160106/gdb/typeprint.c 2016-01-08 19:15:44.984637686 +0100 +@@ -460,6 +460,13 @@ type = value_type (val); @@ -1255,11 +1255,11 @@ Index: gdb-7.10.50.20151027/gdb/typeprint.c get_user_print_options (&opts); if (opts.objectprint) { -Index: gdb-7.10.50.20151027/gdb/valarith.c +Index: gdb-7.10.50.20160106/gdb/valarith.c =================================================================== ---- gdb-7.10.50.20151027.orig/gdb/valarith.c 2015-10-27 02:48:32.000000000 +0100 -+++ gdb-7.10.50.20151027/gdb/valarith.c 2015-11-03 21:13:38.625351736 +0100 -@@ -193,9 +193,21 @@ value_subscripted_rvalue (struct value * +--- gdb-7.10.50.20160106.orig/gdb/valarith.c 2016-01-08 19:15:35.087582482 +0100 ++++ gdb-7.10.50.20160106/gdb/valarith.c 2016-01-08 19:15:44.985637691 +0100 +@@ -193,9 +193,21 @@ struct type *array_type = check_typedef (value_type (array)); struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type)); unsigned int elt_size = type_length_units (elt_type); @@ -1282,11 +1282,11 @@ Index: gdb-7.10.50.20151027/gdb/valarith.c if (index < lowerbound || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type) && elt_offs >= type_length_units (array_type))) { -Index: gdb-7.10.50.20151027/gdb/valprint.c +Index: gdb-7.10.50.20160106/gdb/valprint.c =================================================================== ---- gdb-7.10.50.20151027.orig/gdb/valprint.c 2015-10-27 02:48:32.000000000 +0100 -+++ gdb-7.10.50.20151027/gdb/valprint.c 2015-11-03 21:13:35.959339113 +0100 -@@ -316,6 +316,18 @@ valprint_check_validity (struct ui_file +--- gdb-7.10.50.20160106.orig/gdb/valprint.c 2016-01-08 19:15:35.088582487 +0100 ++++ gdb-7.10.50.20160106/gdb/valprint.c 2016-01-08 19:15:44.986637697 +0100 +@@ -316,6 +316,18 @@ return 0; } @@ -1305,7 +1305,7 @@ Index: gdb-7.10.50.20151027/gdb/valprint.c if (TYPE_CODE (type) != TYPE_CODE_UNION && TYPE_CODE (type) != TYPE_CODE_STRUCT && TYPE_CODE (type) != TYPE_CODE_ARRAY) -@@ -1025,12 +1037,16 @@ static int +@@ -1025,12 +1037,16 @@ value_check_printable (struct value *val, struct ui_file *stream, const struct value_print_options *options) { @@ -1322,7 +1322,7 @@ Index: gdb-7.10.50.20151027/gdb/valprint.c if (value_entirely_optimized_out (val)) { if (options->summary && !val_print_scalar_type_p (value_type (val))) -@@ -1066,6 +1082,18 @@ value_check_printable (struct value *val +@@ -1066,6 +1082,18 @@ { val_print_not_allocated (stream); return 0; @@ -1341,11 +1341,11 @@ Index: gdb-7.10.50.20151027/gdb/valprint.c } return 1; -Index: gdb-7.10.50.20151027/gdb/valprint.h +Index: gdb-7.10.50.20160106/gdb/valprint.h =================================================================== ---- gdb-7.10.50.20151027.orig/gdb/valprint.h 2015-10-27 02:48:32.000000000 +0100 -+++ gdb-7.10.50.20151027/gdb/valprint.h 2015-11-03 21:13:35.959339113 +0100 -@@ -232,4 +232,8 @@ extern void print_command_parse_format ( +--- gdb-7.10.50.20160106.orig/gdb/valprint.h 2016-01-08 19:15:35.088582487 +0100 ++++ gdb-7.10.50.20160106/gdb/valprint.h 2016-01-08 19:15:44.986637697 +0100 +@@ -232,4 +232,8 @@ struct format_data *fmtp); extern void print_value (struct value *val, const struct format_data *fmtp); @@ -1354,10 +1354,10 @@ Index: gdb-7.10.50.20151027/gdb/valprint.h +extern void val_print_not_associated (struct ui_file *stream); + #endif -Index: gdb-7.10.50.20151027/gdb/value.c +Index: gdb-7.10.50.20160106/gdb/value.c =================================================================== ---- gdb-7.10.50.20151027.orig/gdb/value.c 2015-10-27 02:48:32.000000000 +0100 -+++ gdb-7.10.50.20151027/gdb/value.c 2015-11-03 21:13:38.731352238 +0100 +--- gdb-7.10.50.20160106.orig/gdb/value.c 2016-01-08 19:15:35.090582499 +0100 ++++ gdb-7.10.50.20160106/gdb/value.c 2016-01-08 19:15:44.987637702 +0100 @@ -40,6 +40,7 @@ #include "tracepoint.h" #include "cp-abi.h" @@ -1366,7 +1366,7 @@ Index: gdb-7.10.50.20151027/gdb/value.c /* Prototypes for exported functions. */ -@@ -1788,6 +1789,25 @@ set_value_component_location (struct val +@@ -1788,6 +1789,25 @@ if (funcs->copy_closure) component->location.computed.closure = funcs->copy_closure (whole); } @@ -1392,7 +1392,7 @@ Index: gdb-7.10.50.20151027/gdb/value.c } -@@ -3095,13 +3115,22 @@ value_primitive_field (struct value *arg +@@ -3095,13 +3115,22 @@ v = allocate_value_lazy (type); else { @@ -1421,7 +1421,7 @@ Index: gdb-7.10.50.20151027/gdb/value.c } set_value_component_location (v, arg1); VALUE_REGNUM (v) = VALUE_REGNUM (arg1); -@@ -3689,7 +3718,8 @@ readjust_indirect_value_type (struct val +@@ -3689,7 +3718,8 @@ struct value *original_value) { /* Re-adjust type. */ @@ -1431,7 +1431,7 @@ Index: gdb-7.10.50.20151027/gdb/value.c /* Add embedding info. */ set_value_enclosing_type (value, enc_type); -@@ -3706,6 +3736,12 @@ coerce_ref (struct value *arg) +@@ -3706,6 +3736,12 @@ struct value *retval; struct type *enc_type; @@ -1444,7 +1444,7 @@ Index: gdb-7.10.50.20151027/gdb/value.c retval = coerce_ref_if_computed (arg); if (retval) return retval; -@@ -3834,8 +3870,14 @@ value_fetch_lazy (struct value *val) +@@ -3834,8 +3870,14 @@ } else if (VALUE_LVAL (val) == lval_memory) { @@ -1460,12 +1460,12 @@ Index: gdb-7.10.50.20151027/gdb/value.c if (TYPE_LENGTH (type)) read_value_memory (val, 0, value_stack (val), -Index: gdb-7.10.50.20151027/gdb/dwarf2loc.c +Index: gdb-7.10.50.20160106/gdb/dwarf2loc.c =================================================================== ---- gdb-7.10.50.20151027.orig/gdb/dwarf2loc.c 2015-10-27 02:48:31.000000000 +0100 -+++ gdb-7.10.50.20151027/gdb/dwarf2loc.c 2015-11-03 21:13:35.959339113 +0100 -@@ -2347,6 +2347,11 @@ dwarf2_evaluate_loc_desc_full (struct ty - int in_stack_memory = dwarf_expr_fetch_in_stack_memory (ctx, 0); +--- gdb-7.10.50.20160106.orig/gdb/dwarf2loc.c 2016-01-08 19:15:35.091582504 +0100 ++++ gdb-7.10.50.20160106/gdb/dwarf2loc.c 2016-01-08 19:15:44.988637708 +0100 +@@ -2368,6 +2368,11 @@ + address = value_as_address (value_from_pointer (ptr_type, address)); do_cleanups (value_chain); + @@ -1476,7 +1476,7 @@ Index: gdb-7.10.50.20151027/gdb/dwarf2loc.c retval = value_at_lazy (type, address + byte_offset); if (in_stack_memory) set_value_stack (retval, 1); -@@ -2639,6 +2644,19 @@ dwarf2_compile_property_to_c (struct ui_ +@@ -2660,6 +2665,19 @@ data, data + size, per_cu); } diff --git a/gdb.spec b/gdb.spec index d6bb1df..9fb325a 100644 --- a/gdb.spec +++ b/gdb.spec @@ -19,7 +19,7 @@ Summary: A GNU source-level debugger for C, C++, Fortran, Go and other languages Name: %{?scl_prefix}gdb # Freeze it when GDB gets branched -%global snapsrc 20151113 +%global snapsrc 20160106 # See timestamp of source gnulib installed into gdb/gnulib/ . %global snapgnulib 20150822 %global tarname gdb-%{version} @@ -27,7 +27,7 @@ Version: 7.10.50.%{snapsrc} # 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. -Release: 33%{?dist} +Release: 34%{?dist} License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL Group: Development/Debuggers @@ -544,6 +544,18 @@ Patch1044: gdb-pahole-python2.patch # Force libncursesw over libncurses to match the includes (RH BZ 1270534). Patch1056: gdb-fedora-libncursesw.patch +# Fix gdb.multi/base.exp testsuite regression. +Patch1064: gdb-testsuite-multi-base-warnings.patch + +# Fix i386 regression for funcargs.exp. +Patch1065: gdb-testsuite-funcargs-m32.patch + +# Regression for foll-vfork.exp. +Patch1066: gdb-testsuite-foll-vfork.patch + +# Regression for gdb.threads/fork-plus-threads.exp - revert. +Patch1067: gdb-fork-plus-threads-ascending-revert.patch + %if 0%{!?rhel:1} || 0%{?rhel} > 6 # RL_STATE_FEDORA_GDB would not be found for: # Patch642: gdb-readline62-ask-more-rh.patch @@ -842,6 +854,10 @@ find -name "*.info*"|xargs rm -f %patch927 -p1 %patch978 -p1 %patch1056 -p1 +%patch1064 -p1 +%patch1065 -p1 +%patch1066 -p1 +%patch1067 -p1 %patch848 -p1 %if 0%{!?el6:1} @@ -1357,6 +1373,9 @@ then fi %changelog +* Fri Jan 8 2016 Jan Kratochvil - 7.10.50.20160106-34.fc24 +- Rebase to FSF GDB 7.10.50.20160106 (trunk snapshot). + * Sat Nov 14 2015 Jan Kratochvil - 7.10.50.20151113-33.fc24 - Rebase to FSF GDB 7.10.50.20151113 (trunk snapshot). - [testsuite] BuildRequire libmpx for --with testsuite. diff --git a/sources b/sources index f5ca67b..958badf 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 7ad32d3894aaf90d00a4343a735c3e1c gdb-libstdc++-v3-python-r225521.tar.xz -36efc821ddc40656ed50ae7cf34904d1 gdb-7.10.50.20151113.tar.xz +74583201f34dacfa024845578c4760bf gdb-7.10.50.20160106.tar.xz