Add missing testcases present in rhel6 GDB; some still FAIL.
This commit is contained in:
parent
2b94f0063a
commit
29d49d9491
187
gdb-6.3-step-thread-exit-20050211-test.patch
Normal file
187
gdb-6.3-step-thread-exit-20050211-test.patch
Normal file
@ -0,0 +1,187 @@
|
||||
2005-02-11 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* testsuite/gdb.threads/step-thread-exit.c: New testcase.
|
||||
* testsuite/gdb.threads/step-thread-exit.exp: Ditto.
|
||||
|
||||
Index: gdb-7.12/gdb/testsuite/gdb.threads/step-thread-exit.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12/gdb/testsuite/gdb.threads/step-thread-exit.c 2016-10-20 21:36:17.288651989 +0200
|
||||
@@ -0,0 +1,49 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2005 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 2 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program; if not, write to the Free Software
|
||||
+ Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
+ Boston, MA 02111-1307, USA. */
|
||||
+
|
||||
+#include <pthread.h>
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+void *thread_function (void *ptr)
|
||||
+{
|
||||
+ int *x = (int *)ptr;
|
||||
+ printf("In thread_function, *x is %d\n", *x);
|
||||
+} /* thread_function_end */
|
||||
+
|
||||
+volatile int repeat = 0;
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ int ret;
|
||||
+ pthread_t th;
|
||||
+ int i = 3;
|
||||
+
|
||||
+ ret = pthread_create (&th, NULL, thread_function, &i);
|
||||
+ do
|
||||
+ {
|
||||
+ repeat = 0;
|
||||
+ sleep (3); /* sleep */
|
||||
+ }
|
||||
+ while (repeat);
|
||||
+ pthread_join (th, NULL);
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.12/gdb/testsuite/gdb.threads/step-thread-exit.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12/gdb/testsuite/gdb.threads/step-thread-exit.exp 2016-10-20 21:38:17.672579153 +0200
|
||||
@@ -0,0 +1,123 @@
|
||||
+# This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+# Copyright 2005 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 2 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+# Check that GDB can step over a thread exit.
|
||||
+
|
||||
+set testfile "step-thread-exit"
|
||||
+set srcfile ${testfile}.c
|
||||
+set binfile [standard_output_file ${testfile}]
|
||||
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=[standard_output_file .]"]] != "" } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+
|
||||
+# Reset the debug file directory so we can't debug within the C library
|
||||
+gdb_test "set debug-file-directory ." "" ""
|
||||
+
|
||||
+#
|
||||
+# Run to `main' where we begin our tests.
|
||||
+#
|
||||
+
|
||||
+if ![runto_main] then {
|
||||
+ gdb_suppress_tests
|
||||
+}
|
||||
+
|
||||
+# FIXME: Currently the main thread will escape/exit before our thread finishes
|
||||
+# without this setting.
|
||||
+gdb_test "set scheduler-locking step"
|
||||
+gdb_test "show scheduler-locking" "Mode for locking scheduler during execution is \"step\"." "check scheduler-locking first"
|
||||
+
|
||||
+set sleep_line [expr [gdb_get_line_number "sleep"]]
|
||||
+set end_line [expr [gdb_get_line_number "thread_function_end"]]
|
||||
+
|
||||
+gdb_breakpoint "$end_line"
|
||||
+gdb_test "continue" "Break.*thread_function.*" "continue to thread_function 1"
|
||||
+
|
||||
+# Keep nexting until we cause the thread to exit. We expect the main
|
||||
+# thread to be stopped and a message printed to tell us we have stepped
|
||||
+# over the thread exit.
|
||||
+set test "step over thread exit 1"
|
||||
+gdb_test_multiple "next" "$test" {
|
||||
+ -re "\}.*$gdb_prompt $" {
|
||||
+ send_gdb "next\n"
|
||||
+ exp_continue
|
||||
+ }
|
||||
+ -re "\[Thread .* exited\].*Program received signal SIGSTOP.*$gdb_prompt $" {
|
||||
+ pass "$test"
|
||||
+ }
|
||||
+ -re "start_thread.*$gdb_prompt $" {
|
||||
+ send_gdb "next\n"
|
||||
+ exp_continue
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# Without this fixup we could end up in:
|
||||
+# #0 0x00110416 in __kernel_vsyscall ()
|
||||
+# #1 0x0011de26 in __lll_unlock_wake_private () from /lib/libpthread.so.0
|
||||
+# #2 0x001179f4 in _L_unlock_3164 () from /lib/libpthread.so.0
|
||||
+# #3 0x00116f01 in pthread_create@@GLIBC_2.1 () from /lib/libpthread.so.0
|
||||
+# #4 0x08048531 in main () at ../.././gdb/testsuite/gdb.threads/step-thread-exit.c:39
|
||||
+gdb_breakpoint "$sleep_line"
|
||||
+gdb_test "set repeat=1" "" "Get to the sleep function prepare 1"
|
||||
+gdb_test "continue" "Break.*$sleep_line.*" "Get to the sleep function 1"
|
||||
+
|
||||
+gdb_test "bt" "main.*$sleep_line.*" "backtrace after step 1"
|
||||
+
|
||||
+runto_main
|
||||
+gdb_test "show scheduler-locking" "Mode for locking scheduler during execution is \"step\"." "check scheduler-locking second"
|
||||
+
|
||||
+gdb_breakpoint "$sleep_line"
|
||||
+gdb_breakpoint "$end_line"
|
||||
+set test "continue to thread_function 2"
|
||||
+gdb_test_multiple "continue" "$test" {
|
||||
+ -re "Break.*thread_function.*$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+ -re "Break.*$sleep_line.*$gdb_prompt $" {
|
||||
+ gdb_test "set repeat=1" "" ""
|
||||
+ send_gdb "continue\n"
|
||||
+ exp_continue
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# Keep nexting until we cause the thread to exit. In this case, we
|
||||
+# expect the breakpoint in the main thread to have already triggered
|
||||
+# and so we should stop there with a message that we stepped over
|
||||
+# the thread exit.
|
||||
+set test "step over thread exit 2"
|
||||
+gdb_test_multiple "next" "$test" {
|
||||
+ -re "\}.*$gdb_prompt $" {
|
||||
+ send_gdb "next\n"
|
||||
+ exp_continue
|
||||
+ }
|
||||
+ -re "\[Thread .* exited\].*Break.*$sleep_line.*$gdb_prompt $" {
|
||||
+ pass "$test (breakpoint hit)"
|
||||
+ }
|
||||
+ -re "\[Thread .* exited\].*$gdb_prompt $" {
|
||||
+ pass "$test (breakpoint not hit)"
|
||||
+ }
|
||||
+ -re "start_thread.*$gdb_prompt $" {
|
||||
+ send_gdb "next\n"
|
||||
+ exp_continue
|
||||
+ }
|
||||
+}
|
||||
+
|
File diff suppressed because it is too large
Load Diff
226
gdb-physname-pr11734-test.patch
Normal file
226
gdb-physname-pr11734-test.patch
Normal file
@ -0,0 +1,226 @@
|
||||
http://sourceware.org/ml/gdb-patches/2010-12/msg00263.html
|
||||
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-1.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734-1.cc 2011-02-03 22:28:01.000000000 +0100
|
||||
@@ -0,0 +1,30 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@gnu.org */
|
||||
+
|
||||
+#include "pr11734.h"
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+ pr11734 *p = new pr11734;
|
||||
+ p->foo ();
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-2.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734-2.cc 2011-02-03 22:28:01.000000000 +0100
|
||||
@@ -0,0 +1,27 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@gnu.org */
|
||||
+
|
||||
+#include "pr11734.h"
|
||||
+
|
||||
+void
|
||||
+pr11734::foo(void)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-3.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734-3.cc 2011-02-03 22:28:01.000000000 +0100
|
||||
@@ -0,0 +1,27 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@gnu.org */
|
||||
+
|
||||
+#include "pr11734.h"
|
||||
+
|
||||
+void
|
||||
+pr11734::foo (int a)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-4.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734-4.cc 2011-02-03 22:28:01.000000000 +0100
|
||||
@@ -0,0 +1,27 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@gnu.org */
|
||||
+
|
||||
+#include "pr11734.h"
|
||||
+
|
||||
+void
|
||||
+pr11734::foo (char *a)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734.exp 2011-02-03 22:28:01.000000000 +0100
|
||||
@@ -0,0 +1,55 @@
|
||||
+# Copyright 2010 Free Software Foundation, Inc.
|
||||
+#
|
||||
+# Contributed by Red Hat, originally written by Keith Seitz.
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+# This file is part of the gdb testsuite.
|
||||
+
|
||||
+if { [skip_cplus_tests] } { continue }
|
||||
+
|
||||
+set testfile "pr11734"
|
||||
+set class $testfile
|
||||
+
|
||||
+set srcfiles {}
|
||||
+for {set i 1} {$i < 5} {incr i} {
|
||||
+ lappend srcfiles $testfile-$i.cc
|
||||
+}
|
||||
+
|
||||
+prepare_for_testing pr11734 $testfile $srcfiles {c++ debug}
|
||||
+
|
||||
+if {![runto_main]} {
|
||||
+ perror "couldn't run to breakpoint"
|
||||
+ continue
|
||||
+}
|
||||
+
|
||||
+# An array holding the overload types for the method pr11734::foo. The
|
||||
+# first element is the overloaded method parameter. The second element
|
||||
+# is the expected source file number, e.g. "pr11734-?.cc".
|
||||
+array set tests {
|
||||
+ "char*" 4
|
||||
+ "int" 3
|
||||
+ "" 2
|
||||
+}
|
||||
+
|
||||
+# Test each overload instance twice: once quoted, once unquoted
|
||||
+foreach ovld [array names tests] {
|
||||
+ set method "${class}::foo\($ovld\)"
|
||||
+ set result "Breakpoint (\[0-9\]).*file .*/$class-$tests($ovld).*"
|
||||
+ gdb_test "break $method" $result
|
||||
+ gdb_test "break '$method'" $result
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+return 0
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734.h 2011-02-03 22:28:01.000000000 +0100
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@gnu.org */
|
||||
+
|
||||
+class pr11734
|
||||
+{
|
||||
+ public:
|
||||
+ void foo ();
|
||||
+ void foo (int);
|
||||
+ void foo (char *);
|
||||
+};
|
||||
+
|
95
gdb-physname-pr12273-test.patch
Normal file
95
gdb-physname-pr12273-test.patch
Normal file
@ -0,0 +1,95 @@
|
||||
http://sourceware.org/ml/gdb-patches/2010-12/msg00264.html
|
||||
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr12273.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr12273.cc 2011-02-03 22:31:01.000000000 +0100
|
||||
@@ -0,0 +1,37 @@
|
||||
+/* This test case is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+template <typename T>
|
||||
+class GDB
|
||||
+{
|
||||
+ public:
|
||||
+ static int simple (void) { return 0; }
|
||||
+ static int harder (T a) { return 1; }
|
||||
+ template <typename X>
|
||||
+ static X even_harder (T a) { return static_cast<X> (a); }
|
||||
+ int operator == (GDB const& other)
|
||||
+ { return 1; }
|
||||
+};
|
||||
+
|
||||
+int main(int argc, char **argv)
|
||||
+{
|
||||
+ GDB<int> a, b;
|
||||
+ if (a == b)
|
||||
+ return GDB<char>::harder('a') + GDB<int>::harder(3)
|
||||
+ + GDB<char>::even_harder<int> ('a');
|
||||
+ return GDB<int>::simple ();
|
||||
+}
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr12273.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr12273.exp 2011-02-03 22:31:01.000000000 +0100
|
||||
@@ -0,0 +1,46 @@
|
||||
+# Copyright 2010 Free Software Foundation, Inc.
|
||||
+#
|
||||
+# Contributed by Red Hat, originally written by Keith Seitz.
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+# This file is part of the gdb testsuite.
|
||||
+
|
||||
+if {[skip_cplus_tests]} { continue }
|
||||
+
|
||||
+set testfile "pr12273"
|
||||
+# Do NOT compile with debug flag.
|
||||
+prepare_for_testing pr12273 $testfile $testfile.cc {c++}
|
||||
+
|
||||
+gdb_test_no_output "set language c++"
|
||||
+
|
||||
+# A list of minimal symbol names to check.
|
||||
+# Note that GDB<char>::even_harder<int>(char) is quoted and includes
|
||||
+# the return type. This is necessary because this is the demangled name
|
||||
+# of the minimal symbol.
|
||||
+set min_syms [list \
|
||||
+ "GDB<int>::operator ==" \
|
||||
+ "GDB<int>::operator==(GDB<int> const&)" \
|
||||
+ "GDB<char>::harder(char)" \
|
||||
+ "GDB<int>::harder(int)" \
|
||||
+ {"int GDB<char>::even_harder<int>(char)"} \
|
||||
+ "GDB<int>::simple()"]
|
||||
+
|
||||
+foreach sym $min_syms {
|
||||
+ if {[gdb_breakpoint $sym]} {
|
||||
+ pass "setting breakpoint at $sym"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
162
gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
Normal file
162
gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
Normal file
@ -0,0 +1,162 @@
|
||||
Original message by Tom Tromey:
|
||||
|
||||
<https://sourceware.org/ml/gdb-patches/2012-03/msg00955.html>
|
||||
Message-ID: <871uoc1va3.fsf@fleche.redhat.com>
|
||||
|
||||
Comment from Sergio Durigan Junior:
|
||||
|
||||
In order to correctly test this patch, I wrote a testcase based on Jan
|
||||
Kratochvil's <gdb/testsuite/gdb.base/gcore-excessive-memory.exp>. The
|
||||
testcase, which can be seen below, tests GDB in order to see if the
|
||||
amount of memory being leaked is minimal, as requested in the bugzilla.
|
||||
It is hard to define what "minimum" is, so I ran the testcase on all
|
||||
supported RHEL architectures and came up with an average.
|
||||
|
||||
commit cc0265cdda9dc7e8665e8bfcf5b4477489daf27c
|
||||
Author: Tom Tromey <tromey@redhat.com>
|
||||
Date: Wed Mar 28 17:38:08 2012 +0000
|
||||
|
||||
* python/py-inferior.c (infpy_read_memory): Remove cleanups and
|
||||
explicitly free 'buffer' on exit paths. Decref 'membuf_object'
|
||||
before returning.
|
||||
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.c
|
||||
@@ -0,0 +1,27 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2014 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+static struct x
|
||||
+ {
|
||||
+ char unsigned u[4096];
|
||||
+ } x, *px = &x;
|
||||
+
|
||||
+int
|
||||
+main (int argc, char *argv[])
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.exp
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.exp
|
||||
@@ -0,0 +1,68 @@
|
||||
+# Copyright 2014 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+set testfile py-gdb-rhbz1007614-memleak-infpy_read_memory
|
||||
+set srcfile ${testfile}.c
|
||||
+set binfile ${objdir}/${subdir}/${testfile}
|
||||
+
|
||||
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if { [skip_python_tests] } { continue }
|
||||
+
|
||||
+set pid_of_gdb [exp_pid -i [board_info host fileid]]
|
||||
+
|
||||
+proc memory_v_pages_get {} {
|
||||
+ global pid_of_gdb
|
||||
+ set fd [open "/proc/$pid_of_gdb/statm"]
|
||||
+ gets $fd line
|
||||
+ close $fd
|
||||
+ # number of pages of virtual memory
|
||||
+ scan $line "%d" drs
|
||||
+ return $drs
|
||||
+}
|
||||
+
|
||||
+if { ![runto_main] } {
|
||||
+ untested $testfile.exp
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+set remote_python_file [remote_download host ${srcdir}/${subdir}/${testfile}.py]
|
||||
+
|
||||
+gdb_test "source ${remote_python_file}" ""
|
||||
+
|
||||
+gdb_test "hello-world" ""
|
||||
+
|
||||
+set kbytes_before [memory_v_pages_get]
|
||||
+verbose -log "kbytes_before = $kbytes_before"
|
||||
+
|
||||
+gdb_test "hello-world" ""
|
||||
+
|
||||
+set kbytes_after [memory_v_pages_get]
|
||||
+verbose -log "kbytes_after = $kbytes_after"
|
||||
+
|
||||
+set kbytes_diff [expr $kbytes_after - $kbytes_before]
|
||||
+verbose -log "kbytes_diff = $kbytes_diff"
|
||||
+
|
||||
+# The value "1000" was calculated by running a few GDB sessions with this
|
||||
+# testcase, and seeing how much (in average) the memory consumption
|
||||
+# increased after the "hello-world" command issued above. The average
|
||||
+# was around 500 bytes, so I chose 1000 as a high estimate.
|
||||
+if { $kbytes_diff > 1000 } {
|
||||
+ fail "there is a memory leak on GDB (RHBZ 1007614)"
|
||||
+} else {
|
||||
+ pass "there is not a memory leak on GDB (RHBZ 1007614)"
|
||||
+}
|
||||
Index: gdb-7.2/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.py
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ gdb-7.2/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.py
|
||||
@@ -0,0 +1,30 @@
|
||||
+# Copyright (C) 2014 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+class HelloWorld (gdb.Command):
|
||||
+ """Greet the whole world."""
|
||||
+
|
||||
+ def __init__ (self):
|
||||
+ super (HelloWorld, self).__init__ ("hello-world",
|
||||
+ gdb.COMMAND_OBSCURE)
|
||||
+
|
||||
+ def invoke (self, arg, from_tty):
|
||||
+ px = gdb.parse_and_eval("px")
|
||||
+ core = gdb.inferiors()[0]
|
||||
+ for i in range(256 * 1024):
|
||||
+ chunk = core.read_memory(px, 4096)
|
||||
+ print "Hello, World!"
|
||||
+
|
||||
+HelloWorld ()
|
114
gdb-rhbz1149205-catch-syscall-after-fork-test.patch
Normal file
114
gdb-rhbz1149205-catch-syscall-after-fork-test.patch
Normal file
@ -0,0 +1,114 @@
|
||||
URL: <https://sourceware.org/ml/gdb-patches/2013-05/msg00364.html>
|
||||
Message-ID: <1368136582.30058.7.camel@soleil>
|
||||
|
||||
From: Philippe Waroquiers <philippe dot waroquiers at skynet dot be>
|
||||
To: gdb-patches at sourceware dot org
|
||||
Subject: RFA: fix gdb_assert caused by 'catch signal ...' and fork
|
||||
Date: Thu, 09 May 2013 23:56:22 +0200
|
||||
|
||||
The attached patch fixes a gdb_assert caused by the combination of catch
|
||||
signal and fork:
|
||||
break-catch-sig.c:152: internal-error: signal_catchpoint_remove_location: Assertion `signal_catch_counts[iter] > 0' failed.
|
||||
|
||||
The problem is that the signal_catch_counts is decremented by detach_breakpoints.
|
||||
The fix consists in not detaching breakpoint locations of type bp_loc_other.
|
||||
The patch introduces a new test.
|
||||
|
||||
Comments by Sergio Durigan Junior:
|
||||
|
||||
I addded a specific testcase for this patch, which tests exactly the
|
||||
issue that the customer is facing. This patch does not solve the
|
||||
whole problem of catching a syscall and forking (for more details,
|
||||
see <https://sourceware.org/bugzilla/show_bug.cgi?id=13457>,
|
||||
specifically comment #3), but it solves the issue reported by the
|
||||
customer.
|
||||
|
||||
I also removed the original testcase of this patch, because it
|
||||
relied on "catch signal", which is a command that is not implemented
|
||||
in this version of GDB.
|
||||
|
||||
commit bd9673a4ded96ea5c108601501c8e59003ea1be6
|
||||
Author: Philippe Waroquiers <philippe@sourceware.org>
|
||||
Date: Tue May 21 18:47:05 2013 +0000
|
||||
|
||||
Fix internal error caused by interaction between catch signal and fork
|
||||
|
||||
Index: gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.c 2016-10-20 21:03:09.584272695 +0200
|
||||
@@ -0,0 +1,11 @@
|
||||
+#include <stdio.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+int
|
||||
+main (int argc, char **argv)
|
||||
+{
|
||||
+ if (fork () == 0)
|
||||
+ sleep (1);
|
||||
+ chdir (".");
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.exp 2016-10-20 21:04:13.337771174 +0200
|
||||
@@ -0,0 +1,58 @@
|
||||
+# Copyright 2015 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+if { [is_remote target] || ![isnative] } then {
|
||||
+ continue
|
||||
+}
|
||||
+
|
||||
+set testfile "gdb-rhbz1149205-catch-syscall-fork"
|
||||
+set srcfile ${testfile}.c
|
||||
+set binfile [standard_output_file ${testfile}]
|
||||
+
|
||||
+# Until "catch syscall" is implemented on other targets...
|
||||
+if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-linux*"]} then {
|
||||
+ continue
|
||||
+}
|
||||
+
|
||||
+# This shall be updated whenever 'catch syscall' is implemented
|
||||
+# on some architecture.
|
||||
+#if { ![istarget "i\[34567\]86-*-linux*"]
|
||||
+if { ![istarget "x86_64-*-linux*"] && ![istarget "i\[34567\]86-*-linux*"]
|
||||
+ && ![istarget "powerpc-*-linux*"] && ![istarget "powerpc64-*-linux*"]
|
||||
+ && ![istarget "sparc-*-linux*"] && ![istarget "sparc64-*-linux*"] } {
|
||||
+ continue
|
||||
+}
|
||||
+
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
+ untested ${testfile}.exp
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load $binfile
|
||||
+
|
||||
+if { ![runto_main] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_test "catch syscall chdir" \
|
||||
+ "Catchpoint $decimal \\\(syscall (.)?chdir(.)? \\\[$decimal\\\]\\\)" \
|
||||
+ "catch syscall chdir"
|
||||
+
|
||||
+gdb_test "continue" \
|
||||
+ "Continuing\.\r\n.*\r\nCatchpoint $decimal \\\(call to syscall .?chdir.?.*" \
|
||||
+ "continue from catch syscall after fork"
|
322
gdb-rhbz1156192-recursive-dlopen-test.patch
Normal file
322
gdb-rhbz1156192-recursive-dlopen-test.patch
Normal file
@ -0,0 +1,322 @@
|
||||
Index: gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libbar.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libbar.c 2016-10-20 21:03:09.558272492 +0200
|
||||
@@ -0,0 +1,30 @@
|
||||
+/* Testcase for recursive dlopen calls.
|
||||
+
|
||||
+ Copyright (C) 2014 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This file is part of GDB.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+/* This test was copied from glibc's testcase called
|
||||
+ <dlfcn/tst-rec-dlopen.c> and related files. */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+void
|
||||
+bar (void)
|
||||
+{
|
||||
+ printf ("Called bar.\n");
|
||||
+}
|
||||
Index: gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libfoo.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libfoo.c 2016-10-20 21:03:09.558272492 +0200
|
||||
@@ -0,0 +1,30 @@
|
||||
+/* Testcase for recursive dlopen calls.
|
||||
+
|
||||
+ Copyright (C) 2014 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This file is part of GDB.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+/* This test was copied from glibc's testcase called
|
||||
+ <dlfcn/tst-rec-dlopen.c> and related files. */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+void
|
||||
+foo (void)
|
||||
+{
|
||||
+ printf ("Called foo.\n");
|
||||
+}
|
||||
Index: gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.c 2016-10-20 21:03:09.558272492 +0200
|
||||
@@ -0,0 +1,124 @@
|
||||
+/* Testcase for recursive dlopen calls.
|
||||
+
|
||||
+ Copyright (C) 2014 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This file is part of GDB.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+/* This test was copied from glibc's testcase called
|
||||
+ <dlfcn/tst-rec-dlopen.c> and related files. */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <malloc.h>
|
||||
+#include <dlfcn.h>
|
||||
+
|
||||
+#define DSO "gdb-rhbz1156192-recursive-dlopen-libfoo.so"
|
||||
+#define FUNC "foo"
|
||||
+
|
||||
+#define DSO1 "gdb-rhbz1156192-recursive-dlopen-libbar.so"
|
||||
+#define FUNC1 "bar"
|
||||
+
|
||||
+/* Prototype for my hook. */
|
||||
+void *custom_malloc_hook (size_t, const void *);
|
||||
+
|
||||
+/* Pointer to old malloc hooks. */
|
||||
+void *(*old_malloc_hook) (size_t, const void *);
|
||||
+
|
||||
+/* Call function func_name in DSO dso_name via dlopen. */
|
||||
+void
|
||||
+call_func (const char *dso_name, const char *func_name)
|
||||
+{
|
||||
+ int ret;
|
||||
+ void *dso;
|
||||
+ void (*func) (void);
|
||||
+ char *err;
|
||||
+
|
||||
+ /* Open the DSO. */
|
||||
+ dso = dlopen (dso_name, RTLD_NOW|RTLD_GLOBAL);
|
||||
+ if (dso == NULL)
|
||||
+ {
|
||||
+ err = dlerror ();
|
||||
+ fprintf (stderr, "%s\n", err);
|
||||
+ exit (1);
|
||||
+ }
|
||||
+ /* Clear any errors. */
|
||||
+ dlerror ();
|
||||
+
|
||||
+ /* Lookup func. */
|
||||
+ *(void **) (&func) = dlsym (dso, func_name);
|
||||
+ if (func == NULL)
|
||||
+ {
|
||||
+ err = dlerror ();
|
||||
+ if (err != NULL)
|
||||
+ {
|
||||
+ fprintf (stderr, "%s\n", err);
|
||||
+ exit (1);
|
||||
+ }
|
||||
+ }
|
||||
+ /* Call func twice. */
|
||||
+ (*func) ();
|
||||
+
|
||||
+ /* Close the library and look for errors too. */
|
||||
+ ret = dlclose (dso);
|
||||
+ if (ret != 0)
|
||||
+ {
|
||||
+ err = dlerror ();
|
||||
+ fprintf (stderr, "%s\n", err);
|
||||
+ exit (1);
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
+
|
||||
+/* Empty hook that does nothing. */
|
||||
+void *
|
||||
+custom_malloc_hook (size_t size, const void *caller)
|
||||
+{
|
||||
+ void *result;
|
||||
+ /* Restore old hooks. */
|
||||
+ __malloc_hook = old_malloc_hook;
|
||||
+ /* First call a function in another library via dlopen. */
|
||||
+ call_func (DSO1, FUNC1);
|
||||
+ /* Called recursively. */
|
||||
+ result = malloc (size);
|
||||
+ /* Restore new hooks. */
|
||||
+ __malloc_hook = custom_malloc_hook;
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+
|
||||
+ /* Save old hook. */
|
||||
+ old_malloc_hook = __malloc_hook;
|
||||
+ /* Install new hook. */
|
||||
+ __malloc_hook = custom_malloc_hook;
|
||||
+
|
||||
+ /* Attempt to dlopen a shared library. This dlopen will
|
||||
+ trigger an access to the ld.so.cache, and that in turn
|
||||
+ will require a malloc to duplicate data in the cache.
|
||||
+ The malloc will call our malloc hook which calls dlopen
|
||||
+ recursively, and upon return of this dlopen the non-ref
|
||||
+ counted ld.so.cache mapping will be unmapped. We will
|
||||
+ return to the original dlopen and crash trying to access
|
||||
+ dlopened data. */
|
||||
+ call_func (DSO, FUNC);
|
||||
+
|
||||
+ /* Restore old hook. */
|
||||
+ __malloc_hook = old_malloc_hook;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp 2016-10-20 21:06:01.073613545 +0200
|
||||
@@ -0,0 +1,118 @@
|
||||
+# Copyright 2014 Free Software Foundation, Inc.
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+if { [skip_shlib_tests] } {
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+# Library foo
|
||||
+set libname1 "gdb-rhbz1156192-recursive-dlopen-libfoo"
|
||||
+set srcfile_lib1 ${srcdir}/${subdir}/${libname1}.c
|
||||
+set binfile_lib1 [standard_output_file ${libname1}.so]
|
||||
+# Library bar
|
||||
+set libname2 "gdb-rhbz1156192-recursive-dlopen-libbar"
|
||||
+set srcfile_lib2 ${srcdir}/${subdir}/${libname2}.c
|
||||
+set binfile_lib2 [standard_output_file ${libname2}.so]
|
||||
+
|
||||
+set testfile "gdb-rhbz1156192-recursive-dlopen"
|
||||
+set srcfile ${srcdir}/${subdir}/${testfile}.c
|
||||
+set executable ${testfile}
|
||||
+set binfile [standard_output_file ${executable}]
|
||||
+
|
||||
+if { [gdb_compile_shlib ${srcfile_lib1} ${binfile_lib1} \
|
||||
+ { debug "additional_flags=-fPIC" }] != "" } {
|
||||
+ untested "Could not compile ${binfile_lib1}"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if { [gdb_compile_shlib ${srcfile_lib2} ${binfile_lib2} \
|
||||
+ { debug "additional_flags=-fPIC" }] != "" } {
|
||||
+ untested "Could not compile ${binfile_lib2}"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+set opts ""
|
||||
+if { [prepare_for_testing ${testfile}.exp ${executable} ${srcfile} \
|
||||
+ [ list debug shlib_load "additional_flags=-Wno-deprecated-declarations -Wl,${binfile_lib1},-rpath,[file dirname ${binfile_lib1}],${binfile_lib2},-rpath,[file dirname ${binfile_lib2}]" ]] } {
|
||||
+ untested "Could not compile ${executable}"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+proc do_test { has_libfoo has_libbar pass } {
|
||||
+ global hex binfile_lib2 binfile_lib1 gdb_prompt
|
||||
+ set libbar_match "[string_to_regexp $binfile_lib2]"
|
||||
+ set libfoo_match "[string_to_regexp $binfile_lib1]"
|
||||
+
|
||||
+ with_test_prefix "pass #$pass" {
|
||||
+ gdb_test_multiple "info shared" "info shared" {
|
||||
+ -re ".*$libfoo_match\r\n.*$libbar_match\(\r\n.*Shared library is missing.*\)?\r\n${gdb_prompt} $" {
|
||||
+ if { $has_libfoo && $has_libbar } {
|
||||
+ pass "matched libfoo and libbar"
|
||||
+ } else {
|
||||
+ fail "matched libfoo and libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
|
||||
+ }
|
||||
+ }
|
||||
+ -re ".*$libfoo_match\(\r\n.*Shared library is missing.*\)?\r\n${gdb_prompt} $" {
|
||||
+ if { $has_libfoo && !$has_libbar } {
|
||||
+ pass "matched libfoo"
|
||||
+ } else {
|
||||
+ fail "matched libfoo (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
|
||||
+ }
|
||||
+ }
|
||||
+ -re ".*$libbar_match\(\r\n.*Shared library is missing.*\)?\r\n${gdb_prompt} $" {
|
||||
+ if { $has_libbar && !$has_libfoo } {
|
||||
+ pass "matched libbar"
|
||||
+ } else {
|
||||
+ fail "matched libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
|
||||
+ }
|
||||
+ }
|
||||
+ "${gdb_prompt} $" {
|
||||
+ if { !$has_libfoo && !$has_libbar } {
|
||||
+ pass "did not match libfoo nor libbar"
|
||||
+ } else {
|
||||
+ fail "did not match libfoo nor libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+proc test_stop_on_solib_events { } {
|
||||
+ set pass 0
|
||||
+ # This variable holds the information about whether libfoo and
|
||||
+ # libbar (respectively) are expected in the "info shared" output.
|
||||
+ set solib_event_order { { 0 0 } { 0 0 } { 0 0 } { 0 1 } \
|
||||
+ { 0 1 } { 0 0 } { 0 0 } { 0 1 } \
|
||||
+ { 0 1 } { 0 0 } { 0 0 } { 0 1 } \
|
||||
+ { 0 1 } { 0 0 } { 1 0 } { 1 1 } \
|
||||
+ { 1 1 } { 1 0 } { 1 0 } { 1 1 } \
|
||||
+ { 1 1 } { 1 0 } { 1 0 } { 1 0 } }
|
||||
+
|
||||
+ with_test_prefix "stop-on-solib-events" {
|
||||
+ gdb_test_no_output "set stop-on-solib-events 1" "setting stop-on-solib-events"
|
||||
+
|
||||
+ gdb_run_cmd
|
||||
+ foreach l $solib_event_order {
|
||||
+ incr pass
|
||||
+ do_test [lindex $l 0] [lindex $l 1] $pass
|
||||
+ gdb_test "continue" "\(Called \(foo\|bar\)\r\n\)?Stopped due to shared library event"
|
||||
+ }
|
||||
+ # In the last pass we do not expect to see libfoo or libbar.
|
||||
+ incr pass
|
||||
+ do_test 0 0 $pass
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+test_stop_on_solib_events
|
@ -0,0 +1,125 @@
|
||||
Comments from Sergio Durigan Junior:
|
||||
|
||||
The "proper" fix for this whole problem would be to backport the
|
||||
"ambiguous linespec" patch series. However, it is really not
|
||||
recommended to do that for RHEL GDB, because the patch series is too
|
||||
big and could introduce unwanted regressions. Instead, what we
|
||||
chose to do was to replace the gdb_assert call by a warning (which
|
||||
allows the user to continue the debugging session), and tell the
|
||||
user that, although more than one location was found for his/her
|
||||
breakpoint, only one will be used.
|
||||
|
||||
Index: gdb-7.12/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set-main.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set-main.cc 2016-10-20 21:06:31.849854180 +0200
|
||||
@@ -0,0 +1,22 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2015 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+int
|
||||
+main (int argc, char *argv[])
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
Index: gdb-7.12/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set.cc
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set.cc 2016-10-20 21:06:31.850854188 +0200
|
||||
@@ -0,0 +1,26 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2015 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+class C
|
||||
+ {
|
||||
+ public:
|
||||
+ C () {}
|
||||
+ C (int x) {}
|
||||
+ };
|
||||
+
|
||||
+C a;
|
||||
+C b (1);
|
||||
Index: gdb-7.12/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set.exp 2016-10-20 21:09:33.408270526 +0200
|
||||
@@ -0,0 +1,51 @@
|
||||
+# Copyright 2015 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+if { [skip_cplus_tests] } { continue }
|
||||
+if { [skip_shlib_tests] } { continue }
|
||||
+if { [is_remote target] } { continue }
|
||||
+if { [target_info exists use_gdb_stub] } { continue }
|
||||
+
|
||||
+set testfile gdb-rhbz1186476-internal-error-unqualified-name-re-set-main
|
||||
+set srcfile $testfile.cc
|
||||
+set executable $testfile
|
||||
+set binfile [standard_output_file $executable]
|
||||
+
|
||||
+set libtestfile gdb-rhbz1186476-internal-error-unqualified-name-re-set
|
||||
+set libsrcfile $libtestfile.cc
|
||||
+set sofile [standard_output_file lib$libtestfile.so]
|
||||
+
|
||||
+# Create and source the file that provides information about the compiler
|
||||
+# used to compile the test case.
|
||||
+if [get_compiler_info "c++"] {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+if { [gdb_compile_shlib $srcdir/$subdir/$libsrcfile $sofile {debug c++ "additional_flags=-fPIC"}] != ""
|
||||
+ || [gdb_compile $srcdir/$subdir/$srcfile $binfile executable [list additional_flags=-Wl,-rpath,[file dirname ${sofile}] "c++" shlib=${sofile} ]] != ""} {
|
||||
+ untested $libtestfile.exp
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+clean_restart $executable
|
||||
+
|
||||
+gdb_test_no_output "set breakpoint pending on"
|
||||
+# gdb_breakpoint would print a failure because of some warning messages
|
||||
+gdb_test "break C::C" "Breakpoint $decimal \\(C::C\\) pending."
|
||||
+
|
||||
+#gdb_test "run" "warning: Found more than one location for breakpoint #$decimal; only the first location will be used.(\r\n)+Breakpoint $decimal, C::C.*"
|
||||
+gdb_test "run"
|
||||
+
|
||||
+gdb_test "info break" " in C::C\\(\\) at .* in C::C\\(int\\) at .*"
|
461
gdb-test-ivy-bridge.patch
Normal file
461
gdb-test-ivy-bridge.patch
Normal file
@ -0,0 +1,461 @@
|
||||
Index: gdb-7.12/gdb/testsuite/gdb.arch/amd64-ivy-bridge.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12/gdb/testsuite/gdb.arch/amd64-ivy-bridge.exp 2016-10-20 20:57:31.652630455 +0200
|
||||
@@ -0,0 +1,170 @@
|
||||
+# Copyright 2011 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+if {![istarget "x86_64-*-*"]} then {
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
+set testfile amd64-ivy-bridge
|
||||
+set test compilation
|
||||
+if [prepare_for_testing ${testfile}.exp ${testfile}.x ${testfile}.S [list debug "additional_flags=-m64 -nostdlib"]] {
|
||||
+ fail $test
|
||||
+ return -1
|
||||
+}
|
||||
+pass $test
|
||||
+
|
||||
+gdb_test_no_output "set disassembly-flavor att"
|
||||
+# gas/i386/x86-64-rdrnd.d
|
||||
+# gas/i386/x86-64-f16c.d
|
||||
+# gas/i386/x86-64-fsgs.d
|
||||
+gdb_test "disassemble/r _start" "\r
|
||||
+Dump of assembler code for function _start:\r
|
||||
+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand %bx\r
|
||||
+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand %ebx\r
|
||||
+\[^\r\n\]+:\t48 0f c7 f3\t\( \)?rdrand %rbx\r
|
||||
+\[^\r\n\]+:\t66 41 0f c7 f0\t\( \)?rdrand %r8w\r
|
||||
+\[^\r\n\]+:\t41 0f c7 f0\t\( \)?rdrand %r8d\r
|
||||
+\[^\r\n\]+:\t49 0f c7 f0\t\( \)?rdrand %r8\r
|
||||
+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand %bx\r
|
||||
+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand %ebx\r
|
||||
+\[^\r\n\]+:\t48 0f c7 f3\t\( \)?rdrand %rbx\r
|
||||
+\[^\r\n\]+:\t66 41 0f c7 f0\t\( \)?rdrand %r8w\r
|
||||
+\[^\r\n\]+:\t41 0f c7 f0\t\( \)?rdrand %r8d\r
|
||||
+\[^\r\n\]+:\t49 0f c7 f0\t\( \)?rdrand %r8\r
|
||||
+\[^\r\n\]+:\tc4 e2 7d 13 e4\t\( \)?vcvtph2ps %xmm4,%ymm4\r
|
||||
+\[^\r\n\]+:\tc4 42 7d 13 00\t\( \)?vcvtph2ps \\(%r8\\),%ymm8\r
|
||||
+\[^\r\n\]+:\tc4 e2 79 13 f4\t\( \)?vcvtph2ps %xmm4,%xmm6\r
|
||||
+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps \\(%rcx\\),%xmm4\r
|
||||
+\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\( \)?vcvtps2ph \\\$0x2,%ymm4,%xmm4\r
|
||||
+\[^\r\n\]+:\tc4 43 7d 1d 00 02\t\( \)?vcvtps2ph \\\$0x2,%ymm8,\\(%r8\\)\r
|
||||
+\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\( \)?vcvtps2ph \\\$0x2,%xmm4,%xmm4\r
|
||||
+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%xmm4,\\(%rcx\\)\r
|
||||
+\[^\r\n\]+:\tc4 e2 7d 13 e4\t\( \)?vcvtph2ps %xmm4,%ymm4\r
|
||||
+\[^\r\n\]+:\tc4 42 7d 13 00\t\( \)?vcvtph2ps \\(%r8\\),%ymm8\r
|
||||
+\[^\r\n\]+:\tc4 e2 7d 13 21\t\( \)?vcvtph2ps \\(%rcx\\),%ymm4\r
|
||||
+\[^\r\n\]+:\tc4 e2 79 13 f4\t\( \)?vcvtph2ps %xmm4,%xmm6\r
|
||||
+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps \\(%rcx\\),%xmm4\r
|
||||
+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps \\(%rcx\\),%xmm4\r
|
||||
+\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\( \)?vcvtps2ph \\\$0x2,%ymm4,%xmm4\r
|
||||
+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%ymm4,\\(%rcx\\)\r
|
||||
+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%ymm4,\\(%rcx\\)\r
|
||||
+\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\( \)?vcvtps2ph \\\$0x2,%xmm4,%xmm4\r
|
||||
+\[^\r\n\]+:\tc4 43 79 1d 00 02\t\( \)?vcvtps2ph \\\$0x2,%xmm8,\\(%r8\\)\r
|
||||
+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%xmm4,\\(%rcx\\)\r
|
||||
+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase %ebx\r
|
||||
+\[^\r\n\]+:\tf3 48 0f ae c3\t\( \)?rdfsbase %rbx\r
|
||||
+\[^\r\n\]+:\tf3 41 0f ae c0\t\( \)?rdfsbase %r8d\r
|
||||
+\[^\r\n\]+:\tf3 49 0f ae c0\t\( \)?rdfsbase %r8\r
|
||||
+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase %ebx\r
|
||||
+\[^\r\n\]+:\tf3 48 0f ae cb\t\( \)?rdgsbase %rbx\r
|
||||
+\[^\r\n\]+:\tf3 41 0f ae c8\t\( \)?rdgsbase %r8d\r
|
||||
+\[^\r\n\]+:\tf3 49 0f ae c8\t\( \)?rdgsbase %r8\r
|
||||
+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase %ebx\r
|
||||
+\[^\r\n\]+:\tf3 48 0f ae d3\t\( \)?wrfsbase %rbx\r
|
||||
+\[^\r\n\]+:\tf3 41 0f ae d0\t\( \)?wrfsbase %r8d\r
|
||||
+\[^\r\n\]+:\tf3 49 0f ae d0\t\( \)?wrfsbase %r8\r
|
||||
+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase %ebx\r
|
||||
+\[^\r\n\]+:\tf3 48 0f ae db\t\( \)?wrgsbase %rbx\r
|
||||
+\[^\r\n\]+:\tf3 41 0f ae d8\t\( \)?wrgsbase %r8d\r
|
||||
+\[^\r\n\]+:\tf3 49 0f ae d8\t\( \)?wrgsbase %r8\r
|
||||
+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase %ebx\r
|
||||
+\[^\r\n\]+:\tf3 48 0f ae c3\t\( \)?rdfsbase %rbx\r
|
||||
+\[^\r\n\]+:\tf3 41 0f ae c0\t\( \)?rdfsbase %r8d\r
|
||||
+\[^\r\n\]+:\tf3 49 0f ae c0\t\( \)?rdfsbase %r8\r
|
||||
+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase %ebx\r
|
||||
+\[^\r\n\]+:\tf3 48 0f ae cb\t\( \)?rdgsbase %rbx\r
|
||||
+\[^\r\n\]+:\tf3 41 0f ae c8\t\( \)?rdgsbase %r8d\r
|
||||
+\[^\r\n\]+:\tf3 49 0f ae c8\t\( \)?rdgsbase %r8\r
|
||||
+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase %ebx\r
|
||||
+\[^\r\n\]+:\tf3 48 0f ae d3\t\( \)?wrfsbase %rbx\r
|
||||
+\[^\r\n\]+:\tf3 41 0f ae d0\t\( \)?wrfsbase %r8d\r
|
||||
+\[^\r\n\]+:\tf3 49 0f ae d0\t\( \)?wrfsbase %r8\r
|
||||
+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase %ebx\r
|
||||
+\[^\r\n\]+:\tf3 48 0f ae db\t\( \)?wrgsbase %rbx\r
|
||||
+\[^\r\n\]+:\tf3 41 0f ae d8\t\( \)?wrgsbase %r8d\r
|
||||
+\[^\r\n\]+:\tf3 49 0f ae d8\t\( \)?wrgsbase %r8\r
|
||||
+End of assembler dump\\." "att"
|
||||
+
|
||||
+gdb_test_no_output "set disassembly-flavor intel"
|
||||
+# gas/i386/x86-64-rdrnd-intel.d
|
||||
+# gas/i386/x86-64-f16c-intel.d
|
||||
+# gas/i386/x86-64-fsgs-intel.d
|
||||
+gdb_test "disassemble/r _start" "\r
|
||||
+Dump of assembler code for function _start:\r
|
||||
+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand bx\r
|
||||
+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand ebx\r
|
||||
+\[^\r\n\]+:\t48 0f c7 f3\t\( \)?rdrand rbx\r
|
||||
+\[^\r\n\]+:\t66 41 0f c7 f0\t\( \)?rdrand r8w\r
|
||||
+\[^\r\n\]+:\t41 0f c7 f0\t\( \)?rdrand r8d\r
|
||||
+\[^\r\n\]+:\t49 0f c7 f0\t\( \)?rdrand r8\r
|
||||
+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand bx\r
|
||||
+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand ebx\r
|
||||
+\[^\r\n\]+:\t48 0f c7 f3\t\( \)?rdrand rbx\r
|
||||
+\[^\r\n\]+:\t66 41 0f c7 f0\t\( \)?rdrand r8w\r
|
||||
+\[^\r\n\]+:\t41 0f c7 f0\t\( \)?rdrand r8d\r
|
||||
+\[^\r\n\]+:\t49 0f c7 f0\t\( \)?rdrand r8\r
|
||||
+\[^\r\n\]+:\tc4 e2 7d 13 e4\t\( \)?vcvtph2ps ymm4,xmm4\r
|
||||
+\[^\r\n\]+:\tc4 42 7d 13 00\t\( \)?vcvtph2ps ymm8,XMMWORD PTR \\\[r8\\\]\r
|
||||
+\[^\r\n\]+:\tc4 e2 79 13 f4\t\( \)?vcvtph2ps xmm6,xmm4\r
|
||||
+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps xmm4,QWORD PTR \\\[rcx\\\]\r
|
||||
+\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\( \)?vcvtps2ph xmm4,ymm4,0x2\r
|
||||
+\[^\r\n\]+:\tc4 43 7d 1d 00 02\t\( \)?vcvtps2ph XMMWORD PTR \\\[r8\\\],ymm8,0x2\r
|
||||
+\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\( \)?vcvtps2ph xmm4,xmm4,0x2\r
|
||||
+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph QWORD PTR \\\[rcx\\\],xmm4,0x2\r
|
||||
+\[^\r\n\]+:\tc4 e2 7d 13 e4\t\( \)?vcvtph2ps ymm4,xmm4\r
|
||||
+\[^\r\n\]+:\tc4 42 7d 13 00\t\( \)?vcvtph2ps ymm8,XMMWORD PTR \\\[r8\\\]\r
|
||||
+\[^\r\n\]+:\tc4 e2 7d 13 21\t\( \)?vcvtph2ps ymm4,XMMWORD PTR \\\[rcx\\\]\r
|
||||
+\[^\r\n\]+:\tc4 e2 79 13 f4\t\( \)?vcvtph2ps xmm6,xmm4\r
|
||||
+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps xmm4,QWORD PTR \\\[rcx\\\]\r
|
||||
+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps xmm4,QWORD PTR \\\[rcx\\\]\r
|
||||
+\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\( \)?vcvtps2ph xmm4,ymm4,0x2\r
|
||||
+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph XMMWORD PTR \\\[rcx\\\],ymm4,0x2\r
|
||||
+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph XMMWORD PTR \\\[rcx\\\],ymm4,0x2\r
|
||||
+\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\( \)?vcvtps2ph xmm4,xmm4,0x2\r
|
||||
+\[^\r\n\]+:\tc4 43 79 1d 00 02\t\( \)?vcvtps2ph QWORD PTR \\\[r8\\\],xmm8,0x2\r
|
||||
+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph QWORD PTR \\\[rcx\\\],xmm4,0x2\r
|
||||
+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase ebx\r
|
||||
+\[^\r\n\]+:\tf3 48 0f ae c3\t\( \)?rdfsbase rbx\r
|
||||
+\[^\r\n\]+:\tf3 41 0f ae c0\t\( \)?rdfsbase r8d\r
|
||||
+\[^\r\n\]+:\tf3 49 0f ae c0\t\( \)?rdfsbase r8\r
|
||||
+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase ebx\r
|
||||
+\[^\r\n\]+:\tf3 48 0f ae cb\t\( \)?rdgsbase rbx\r
|
||||
+\[^\r\n\]+:\tf3 41 0f ae c8\t\( \)?rdgsbase r8d\r
|
||||
+\[^\r\n\]+:\tf3 49 0f ae c8\t\( \)?rdgsbase r8\r
|
||||
+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase ebx\r
|
||||
+\[^\r\n\]+:\tf3 48 0f ae d3\t\( \)?wrfsbase rbx\r
|
||||
+\[^\r\n\]+:\tf3 41 0f ae d0\t\( \)?wrfsbase r8d\r
|
||||
+\[^\r\n\]+:\tf3 49 0f ae d0\t\( \)?wrfsbase r8\r
|
||||
+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase ebx\r
|
||||
+\[^\r\n\]+:\tf3 48 0f ae db\t\( \)?wrgsbase rbx\r
|
||||
+\[^\r\n\]+:\tf3 41 0f ae d8\t\( \)?wrgsbase r8d\r
|
||||
+\[^\r\n\]+:\tf3 49 0f ae d8\t\( \)?wrgsbase r8\r
|
||||
+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase ebx\r
|
||||
+\[^\r\n\]+:\tf3 48 0f ae c3\t\( \)?rdfsbase rbx\r
|
||||
+\[^\r\n\]+:\tf3 41 0f ae c0\t\( \)?rdfsbase r8d\r
|
||||
+\[^\r\n\]+:\tf3 49 0f ae c0\t\( \)?rdfsbase r8\r
|
||||
+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase ebx\r
|
||||
+\[^\r\n\]+:\tf3 48 0f ae cb\t\( \)?rdgsbase rbx\r
|
||||
+\[^\r\n\]+:\tf3 41 0f ae c8\t\( \)?rdgsbase r8d\r
|
||||
+\[^\r\n\]+:\tf3 49 0f ae c8\t\( \)?rdgsbase r8\r
|
||||
+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase ebx\r
|
||||
+\[^\r\n\]+:\tf3 48 0f ae d3\t\( \)?wrfsbase rbx\r
|
||||
+\[^\r\n\]+:\tf3 41 0f ae d0\t\( \)?wrfsbase r8d\r
|
||||
+\[^\r\n\]+:\tf3 49 0f ae d0\t\( \)?wrfsbase r8\r
|
||||
+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase ebx\r
|
||||
+\[^\r\n\]+:\tf3 48 0f ae db\t\( \)?wrgsbase rbx\r
|
||||
+\[^\r\n\]+:\tf3 41 0f ae d8\t\( \)?wrgsbase r8d\r
|
||||
+\[^\r\n\]+:\tf3 49 0f ae d8\t\( \)?wrgsbase r8\r
|
||||
+End of assembler dump\\." "intel"
|
||||
Index: gdb-7.12/gdb/testsuite/gdb.arch/i386-ivy-bridge.exp
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12/gdb/testsuite/gdb.arch/i386-ivy-bridge.exp 2016-10-20 20:57:43.251721147 +0200
|
||||
@@ -0,0 +1,106 @@
|
||||
+# Copyright 2011 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+if {![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]} then {
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
+set testfile i386-ivy-bridge
|
||||
+set test compilation
|
||||
+if [prepare_for_testing ${testfile}.exp ${testfile}.x ${testfile}.S [list debug "additional_flags=-m32 -nostdlib"]] {
|
||||
+ fail $test
|
||||
+ return -1
|
||||
+}
|
||||
+pass $test
|
||||
+
|
||||
+gdb_test_no_output "set disassembly-flavor att"
|
||||
+# gas/i386/rdrnd.d
|
||||
+# gas/i386/f16c.d
|
||||
+# gas/i386/fsgs.d
|
||||
+gdb_test "disassemble/r _start" "\r
|
||||
+Dump of assembler code for function _start:\r
|
||||
+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand %bx\r
|
||||
+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand %ebx\r
|
||||
+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand %bx\r
|
||||
+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand %ebx\r
|
||||
+\[^\r\n\]+:\tc4 e2 7d 13 e4\t\( \)?vcvtph2ps %xmm4,%ymm4\r
|
||||
+\[^\r\n\]+:\tc4 e2 7d 13 21\t\( \)?vcvtph2ps \\(%ecx\\),%ymm4\r
|
||||
+\[^\r\n\]+:\tc4 e2 79 13 f4\t\( \)?vcvtph2ps %xmm4,%xmm6\r
|
||||
+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps \\(%ecx\\),%xmm4\r
|
||||
+\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\( \)?vcvtps2ph \\\$0x2,%ymm4,%xmm4\r
|
||||
+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%ymm4,\\(%ecx\\)\r
|
||||
+\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\( \)?vcvtps2ph \\\$0x2,%xmm4,%xmm4\r
|
||||
+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%xmm4,\\(%ecx\\)\r
|
||||
+\[^\r\n\]+:\tc4 e2 7d 13 e4\t\( \)?vcvtph2ps %xmm4,%ymm4\r
|
||||
+\[^\r\n\]+:\tc4 e2 7d 13 21\t\( \)?vcvtph2ps \\(%ecx\\),%ymm4\r
|
||||
+\[^\r\n\]+:\tc4 e2 7d 13 21\t\( \)?vcvtph2ps \\(%ecx\\),%ymm4\r
|
||||
+\[^\r\n\]+:\tc4 e2 79 13 f4\t\( \)?vcvtph2ps %xmm4,%xmm6\r
|
||||
+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps \\(%ecx\\),%xmm4\r
|
||||
+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps \\(%ecx\\),%xmm4\r
|
||||
+\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\( \)?vcvtps2ph \\\$0x2,%ymm4,%xmm4\r
|
||||
+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%ymm4,\\(%ecx\\)\r
|
||||
+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%ymm4,\\(%ecx\\)\r
|
||||
+\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\( \)?vcvtps2ph \\\$0x2,%xmm4,%xmm4\r
|
||||
+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%xmm4,\\(%ecx\\)\r
|
||||
+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%xmm4,\\(%ecx\\)\r
|
||||
+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase %ebx\r
|
||||
+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase %ebx\r
|
||||
+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase %ebx\r
|
||||
+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase %ebx\r
|
||||
+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase %ebx\r
|
||||
+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase %ebx\r
|
||||
+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase %ebx\r
|
||||
+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase %ebx\r
|
||||
+End of assembler dump\\." "att"
|
||||
+
|
||||
+gdb_test_no_output "set disassembly-flavor intel"
|
||||
+# gas/i386/rdrnd-intel.d
|
||||
+# gas/i386/f16c-intel.d
|
||||
+# gas/i386/fsgs-intel.d
|
||||
+gdb_test "disassemble/r _start" "\r
|
||||
+Dump of assembler code for function _start:\r
|
||||
+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand bx\r
|
||||
+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand ebx\r
|
||||
+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand bx\r
|
||||
+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand ebx\r
|
||||
+\[^\r\n\]+:\tc4 e2 7d 13 e4\t\( \)?vcvtph2ps ymm4,xmm4\r
|
||||
+\[^\r\n\]+:\tc4 e2 7d 13 21\t\( \)?vcvtph2ps ymm4,XMMWORD PTR \\\[ecx\\\]\r
|
||||
+\[^\r\n\]+:\tc4 e2 79 13 f4\t\( \)?vcvtph2ps xmm6,xmm4\r
|
||||
+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps xmm4,QWORD PTR \\\[ecx\\\]\r
|
||||
+\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\( \)?vcvtps2ph xmm4,ymm4,0x2\r
|
||||
+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph XMMWORD PTR \\\[ecx\\\],ymm4,0x2\r
|
||||
+\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\( \)?vcvtps2ph xmm4,xmm4,0x2\r
|
||||
+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph QWORD PTR \\\[ecx\\\],xmm4,0x2\r
|
||||
+\[^\r\n\]+:\tc4 e2 7d 13 e4\t\( \)?vcvtph2ps ymm4,xmm4\r
|
||||
+\[^\r\n\]+:\tc4 e2 7d 13 21\t\( \)?vcvtph2ps ymm4,XMMWORD PTR \\\[ecx\\\]\r
|
||||
+\[^\r\n\]+:\tc4 e2 7d 13 21\t\( \)?vcvtph2ps ymm4,XMMWORD PTR \\\[ecx\\\]\r
|
||||
+\[^\r\n\]+:\tc4 e2 79 13 f4\t\( \)?vcvtph2ps xmm6,xmm4\r
|
||||
+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps xmm4,QWORD PTR \\\[ecx\\\]\r
|
||||
+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps xmm4,QWORD PTR \\\[ecx\\\]\r
|
||||
+\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\( \)?vcvtps2ph xmm4,ymm4,0x2\r
|
||||
+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph XMMWORD PTR \\\[ecx\\\],ymm4,0x2\r
|
||||
+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph XMMWORD PTR \\\[ecx\\\],ymm4,0x2\r
|
||||
+\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\( \)?vcvtps2ph xmm4,xmm4,0x2\r
|
||||
+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph QWORD PTR \\\[ecx\\\],xmm4,0x2\r
|
||||
+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph QWORD PTR \\\[ecx\\\],xmm4,0x2\r
|
||||
+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase ebx\r
|
||||
+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase ebx\r
|
||||
+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase ebx\r
|
||||
+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase ebx\r
|
||||
+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase ebx\r
|
||||
+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase ebx\r
|
||||
+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase ebx\r
|
||||
+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase ebx\r
|
||||
+End of assembler dump\\." "intel"
|
||||
Index: gdb-7.12/gdb/testsuite/gdb.arch/amd64-ivy-bridge.S
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12/gdb/testsuite/gdb.arch/amd64-ivy-bridge.S 2016-10-20 20:55:50.853842324 +0200
|
||||
@@ -0,0 +1,98 @@
|
||||
+/* Copyright 2011 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ This file is part of the gdb testsuite. */
|
||||
+
|
||||
+ .globl _start
|
||||
+_start: .text
|
||||
+
|
||||
+/* gas/i386/x86-64-rdrnd.s */
|
||||
+ .att_syntax prefix
|
||||
+ rdrand %bx
|
||||
+ rdrand %ebx
|
||||
+ rdrand %rbx
|
||||
+ rdrand %r8w
|
||||
+ rdrand %r8d
|
||||
+ rdrand %r8
|
||||
+
|
||||
+ .intel_syntax noprefix
|
||||
+ rdrand bx
|
||||
+ rdrand ebx
|
||||
+ rdrand rbx
|
||||
+ rdrand r8w
|
||||
+ rdrand r8d
|
||||
+ rdrand r8
|
||||
+
|
||||
+/* gas/i386/x86-64-f16c.s */
|
||||
+ .att_syntax prefix
|
||||
+ vcvtph2ps %xmm4,%ymm4
|
||||
+ vcvtph2ps (%r8),%ymm8
|
||||
+ vcvtph2ps %xmm4,%xmm6
|
||||
+ vcvtph2ps (%rcx),%xmm4
|
||||
+ vcvtps2ph $0x2,%ymm4,%xmm4
|
||||
+ vcvtps2ph $0x2,%ymm8,(%r8)
|
||||
+ vcvtps2ph $0x2,%xmm4,%xmm4
|
||||
+ vcvtps2ph $0x2,%xmm4,(%rcx)
|
||||
+
|
||||
+ .intel_syntax noprefix
|
||||
+ vcvtph2ps ymm4,xmm4
|
||||
+ vcvtph2ps ymm8,XMMWORD PTR [r8]
|
||||
+ vcvtph2ps ymm4,[rcx]
|
||||
+ vcvtph2ps xmm6,xmm4
|
||||
+ vcvtph2ps xmm4,QWORD PTR [rcx]
|
||||
+ vcvtph2ps xmm4,[rcx]
|
||||
+ vcvtps2ph xmm4,ymm4,0x2
|
||||
+ vcvtps2ph XMMWORD PTR [rcx],ymm4,0x2
|
||||
+ vcvtps2ph [rcx],ymm4,0x2
|
||||
+ vcvtps2ph xmm4,xmm4,0x2
|
||||
+ vcvtps2ph QWORD PTR [r8],xmm8,0x2
|
||||
+ vcvtps2ph [rcx],xmm4,0x2
|
||||
+
|
||||
+/* gas/i386/x86-64-fsgs.s */
|
||||
+ .att_syntax prefix
|
||||
+ rdfsbase %ebx
|
||||
+ rdfsbase %rbx
|
||||
+ rdfsbase %r8d
|
||||
+ rdfsbase %r8
|
||||
+ rdgsbase %ebx
|
||||
+ rdgsbase %rbx
|
||||
+ rdgsbase %r8d
|
||||
+ rdgsbase %r8
|
||||
+ wrfsbase %ebx
|
||||
+ wrfsbase %rbx
|
||||
+ wrfsbase %r8d
|
||||
+ wrfsbase %r8
|
||||
+ wrgsbase %ebx
|
||||
+ wrgsbase %rbx
|
||||
+ wrgsbase %r8d
|
||||
+ wrgsbase %r8
|
||||
+
|
||||
+ .intel_syntax noprefix
|
||||
+ rdfsbase ebx
|
||||
+ rdfsbase rbx
|
||||
+ rdfsbase r8d
|
||||
+ rdfsbase r8
|
||||
+ rdgsbase ebx
|
||||
+ rdgsbase rbx
|
||||
+ rdgsbase r8d
|
||||
+ rdgsbase r8
|
||||
+ wrfsbase ebx
|
||||
+ wrfsbase rbx
|
||||
+ wrfsbase r8d
|
||||
+ wrfsbase r8
|
||||
+ wrgsbase ebx
|
||||
+ wrgsbase rbx
|
||||
+ wrgsbase r8d
|
||||
+ wrgsbase r8
|
||||
Index: gdb-7.12/gdb/testsuite/gdb.arch/i386-ivy-bridge.S
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gdb-7.12/gdb/testsuite/gdb.arch/i386-ivy-bridge.S 2016-10-20 20:55:50.853842324 +0200
|
||||
@@ -0,0 +1,67 @@
|
||||
+/* Copyright 2011 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ This file is part of the gdb testsuite. */
|
||||
+
|
||||
+ .globl _start
|
||||
+_start: .text
|
||||
+
|
||||
+/* gas/i386/rdrnd.s */
|
||||
+ .att_syntax prefix
|
||||
+ rdrand %bx
|
||||
+ rdrand %ebx
|
||||
+
|
||||
+ .intel_syntax noprefix
|
||||
+ rdrand bx
|
||||
+ rdrand ebx
|
||||
+
|
||||
+/* gas/i386/f16c.s */
|
||||
+ .att_syntax prefix
|
||||
+ vcvtph2ps %xmm4,%ymm4
|
||||
+ vcvtph2ps (%ecx),%ymm4
|
||||
+ vcvtph2ps %xmm4,%xmm6
|
||||
+ vcvtph2ps (%ecx),%xmm4
|
||||
+ vcvtps2ph $0x2,%ymm4,%xmm4
|
||||
+ vcvtps2ph $0x2,%ymm4,(%ecx)
|
||||
+ vcvtps2ph $0x2,%xmm4,%xmm4
|
||||
+ vcvtps2ph $0x2,%xmm4,(%ecx)
|
||||
+
|
||||
+ .intel_syntax noprefix
|
||||
+ vcvtph2ps ymm4,xmm4
|
||||
+ vcvtph2ps ymm4,XMMWORD PTR [ecx]
|
||||
+ vcvtph2ps ymm4,[ecx]
|
||||
+ vcvtph2ps xmm6,xmm4
|
||||
+ vcvtph2ps xmm4,QWORD PTR [ecx]
|
||||
+ vcvtph2ps xmm4,[ecx]
|
||||
+ vcvtps2ph xmm4,ymm4,0x2
|
||||
+ vcvtps2ph XMMWORD PTR [ecx],ymm4,0x2
|
||||
+ vcvtps2ph [ecx],ymm4,0x2
|
||||
+ vcvtps2ph xmm4,xmm4,0x2
|
||||
+ vcvtps2ph QWORD PTR [ecx],xmm4,0x2
|
||||
+ vcvtps2ph [ecx],xmm4,0x2
|
||||
+
|
||||
+/* gas/i386/fsgs.s */
|
||||
+ .att_syntax prefix
|
||||
+ rdfsbase %ebx
|
||||
+ rdgsbase %ebx
|
||||
+ wrfsbase %ebx
|
||||
+ wrgsbase %ebx
|
||||
+
|
||||
+ .intel_syntax noprefix
|
||||
+ rdfsbase ebx
|
||||
+ rdgsbase ebx
|
||||
+ wrfsbase ebx
|
||||
+ wrgsbase ebx
|
||||
+
|
@ -409,3 +409,52 @@ index 6c10dfc..a1b8065 100644
|
||||
main (void)
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2016-10/msg00613.html
|
||||
Subject: [testsuite patch] Fix gcc_compiled for gcc 6 & 7
|
||||
|
||||
|
||||
--IS0zKkzwUGydFO0o
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline
|
||||
|
||||
Hi,
|
||||
|
||||
OK for check-in?
|
||||
|
||||
|
||||
Jan
|
||||
|
||||
--IS0zKkzwUGydFO0o
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline; filename=1
|
||||
|
||||
gdb/testsuite/ChangeLog
|
||||
2016-10-20 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* lib/gdb.exp (get_compiler_info): Generalize gcc_compile regexp.
|
||||
|
||||
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
||||
index 378eea0..7d9b198 100644
|
||||
--- a/gdb/testsuite/lib/gdb.exp
|
||||
+++ b/gdb/testsuite/lib/gdb.exp
|
||||
@@ -3290,12 +3290,8 @@ proc get_compiler_info {{arg ""}} {
|
||||
}
|
||||
|
||||
# Set the legacy symbols.
|
||||
- set gcc_compiled 0
|
||||
- if { [regexp "^gcc-1-" "$compiler_info" ] } { set gcc_compiled 1 }
|
||||
- if { [regexp "^gcc-2-" "$compiler_info" ] } { set gcc_compiled 2 }
|
||||
- if { [regexp "^gcc-3-" "$compiler_info" ] } { set gcc_compiled 3 }
|
||||
- if { [regexp "^gcc-4-" "$compiler_info" ] } { set gcc_compiled 4 }
|
||||
- if { [regexp "^gcc-5-" "$compiler_info" ] } { set gcc_compiled 5 }
|
||||
+ set gcc_compiled 0
|
||||
+ regexp "^gcc-(\[0-9\]+)-" "$compiler_info" matchall gcc_compiled
|
||||
|
||||
# Log what happened.
|
||||
verbose -log "get_compiler_info: $compiler_info"
|
||||
|
||||
--IS0zKkzwUGydFO0o--
|
||||
|
||||
|
47
gdb.spec
47
gdb.spec
@ -26,7 +26,7 @@ Version: 7.12
|
||||
|
||||
# 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: 25%{?dist}
|
||||
Release: 26%{?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
|
||||
@ -289,6 +289,9 @@ Patch254: gdb-6.6-testsuite-timeouts.patch
|
||||
#=fedoratest
|
||||
Patch258: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
|
||||
|
||||
# Stop while intentionally stepping and the thread exit is met.
|
||||
Patch259: gdb-6.3-step-thread-exit-20050211-test.patch
|
||||
|
||||
# Test kernel VDSO decoding while attaching to an i386 process.
|
||||
#=fedoratest
|
||||
Patch263: gdb-6.3-attach-see-vdso-test.patch
|
||||
@ -475,6 +478,10 @@ Patch547: gdb-test-dw2-aranges.patch
|
||||
#=fedoratest
|
||||
Patch548: gdb-test-expr-cumulative-archer.patch
|
||||
|
||||
# Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
|
||||
Patch565: gdb-physname-pr11734-test.patch
|
||||
Patch567: gdb-physname-pr12273-test.patch
|
||||
|
||||
# Toolchain on sparc is slightly broken and debuginfo files are generated
|
||||
# with non 64bit aligned tables/offsets.
|
||||
# See for example readelf -S ../Xvnc.debug.
|
||||
@ -489,6 +496,9 @@ Patch548: gdb-test-expr-cumulative-archer.patch
|
||||
#=push+work
|
||||
Patch579: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
|
||||
|
||||
# Test GDB opcodes/ disassembly of Intel Ivy Bridge instructions (BZ 696890).
|
||||
Patch616: gdb-test-ivy-bridge.patch
|
||||
|
||||
# Work around PR libc/13097 "linux-vdso.so.1" warning message.
|
||||
#=push
|
||||
Patch627: gdb-glibc-vdso-workaround.patch
|
||||
@ -544,6 +554,9 @@ Patch848: gdb-dts-rhel6-python-compat.patch
|
||||
# Fix crash of -readnow /usr/lib/debug/usr/bin/gnatbind.debug (BZ 1069211).
|
||||
Patch852: gdb-gnat-dwarf-crash-3of3.patch
|
||||
|
||||
# Fix 'memory leak in infpy_read_memory()' (RH BZ 1007614)
|
||||
Patch861: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
|
||||
|
||||
# VLA (Fortran dynamic arrays) from Intel + archer-jankratochvil-vla tests.
|
||||
Patch1058: gdb-vla-intel-fortran-strides.patch
|
||||
Patch1132: gdb-vla-intel-fortran-vla-strings.patch
|
||||
@ -560,9 +573,22 @@ Patch925: gdb-fortran-frame-string.patch
|
||||
# Fix Python GIL with gdb.execute("continue") (Phil Muldoon, BZ 1116957).
|
||||
Patch927: gdb-python-gil.patch
|
||||
|
||||
# Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to
|
||||
# crash.' (RH BZ 1156192).
|
||||
Patch977: gdb-rhbz1156192-recursive-dlopen-test.patch
|
||||
|
||||
# Fix jit-reader.h for multi-lib.
|
||||
Patch978: gdb-jit-reader-multilib.patch
|
||||
|
||||
# Fix '`catch syscall' doesn't work for parent after `fork' is called'
|
||||
# (Philippe Waroquiers, RH BZ 1149205).
|
||||
Patch984: gdb-rhbz1149205-catch-syscall-after-fork-test.patch
|
||||
|
||||
# Fix 'backport GDB 7.4 fix to RHEL 6.6 GDB' [Original Sourceware bug
|
||||
# description: 'C++ (and objc): Internal error on unqualified name
|
||||
# re-set', PR 11657] (RH BZ 1186476).
|
||||
Patch991: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch
|
||||
|
||||
# Test 'info type-printers' Python error (RH BZ 1350436).
|
||||
Patch992: gdb-rhbz1350436-type-printers-error.patch
|
||||
|
||||
@ -877,6 +903,7 @@ find -name "*.info*"|xargs rm -f
|
||||
%patch247 -p1
|
||||
%patch254 -p1
|
||||
%patch258 -p1
|
||||
%patch259 -p1
|
||||
%patch260 -p1
|
||||
%patch263 -p1
|
||||
%patch271 -p1
|
||||
@ -922,7 +949,10 @@ find -name "*.info*"|xargs rm -f
|
||||
%patch542 -p1
|
||||
%patch547 -p1
|
||||
%patch548 -p1
|
||||
%patch565 -p1
|
||||
%patch567 -p1
|
||||
%patch579 -p1
|
||||
%patch616 -p1
|
||||
%patch627 -p1
|
||||
%patch634 -p1
|
||||
%patch653 -p1
|
||||
@ -939,13 +969,17 @@ find -name "*.info*"|xargs rm -f
|
||||
%patch818 -p1
|
||||
%patch832 -p1
|
||||
%patch852 -p1
|
||||
%patch861 -p1
|
||||
%patch863 -p1
|
||||
%patch887 -p1
|
||||
%patch888 -p1
|
||||
%patch918 -p1
|
||||
%patch925 -p1
|
||||
%patch927 -p1
|
||||
%patch977 -p1
|
||||
%patch978 -p1
|
||||
%patch984 -p1
|
||||
%patch991 -p1
|
||||
%patch992 -p1
|
||||
%patch1026 -p1
|
||||
%patch1053 -p1
|
||||
@ -1306,10 +1340,12 @@ make %{?_smp_mflags} install DESTDIR=$RPM_BUILD_ROOT
|
||||
%if 0%{!?scl:1}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/libexec
|
||||
mv -f $RPM_BUILD_ROOT%{_bindir}/gdb $RPM_BUILD_ROOT%{_prefix}/libexec/gdb
|
||||
# RHEL-6: ln: invalid option -- 'r'
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1384947
|
||||
# ln -s -r $RPM_BUILD_ROOT%{_prefix}/libexec/gdb $RPM_BUILD_ROOT%{_bindir}/gdb
|
||||
%if 0%{?rhel:1} && 0%{?rhel} <= 6
|
||||
# RHEL-6: ln: invalid option -- 'r': https://bugzilla.redhat.com/show_bug.cgi?id=1384947
|
||||
ln -s $(realpath --relative-to=$RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_prefix}/libexec/gdb) $RPM_BUILD_ROOT%{_bindir}/gdb
|
||||
%else
|
||||
ln -s -r $RPM_BUILD_ROOT%{_prefix}/libexec/gdb $RPM_BUILD_ROOT%{_bindir}/gdb
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# Provide gdbtui for RHEL-5 and RHEL-6 as it is removed upstream (BZ 797664).
|
||||
@ -1536,6 +1572,9 @@ then
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Thu Oct 20 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.12-26.fc25
|
||||
- Add missing testcases present in rhel6 GDB; some still FAIL.
|
||||
|
||||
* Fri Oct 14 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.12-25.fc25
|
||||
- [rhel6] Fix .spec without devtoolset-6-build installed (RH BZ 1384947).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user