Blame SOURCES/gdb-6.5-bz218379-ppc-solib-trampoline-test.patch

7a6771
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
7a6771
7a6771
7a6771
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/step-over-trampoline.exp
7a6771
===================================================================
7a6771
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
7a6771
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/step-over-trampoline.exp	2016-02-15 23:31:47.312232078 +0100
7a6771
@@ -0,0 +1,54 @@
7a6771
+# Copyright 2006 Free Software Foundation, Inc.
7a6771
+
7a6771
+# This program is free software; you can redistribute it and/or modify
7a6771
+# it under the terms of the GNU General Public License as published by
7a6771
+# the Free Software Foundation; either version 2 of the License, or
7a6771
+# (at your option) any later version.
7a6771
+# 
7a6771
+# This program is distributed in the hope that it will be useful,
7a6771
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
7a6771
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7a6771
+# GNU General Public License for more details.
7a6771
+# 
7a6771
+# You should have received a copy of the GNU General Public License
7a6771
+# along with this program; if not, write to the Free Software
7a6771
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
7a6771
+
7a6771
+if $tracelevel then {
7a6771
+    strace $tracelevel
7a6771
+}
7a6771
+
7a6771
+set testfile step-over-trampoline
7a6771
+set srcfile ${testfile}.c
7a6771
+set binfile [standard_output_file ${testfile}]
7a6771
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
7a6771
+    untested "Couldn't compile test program"
7a6771
+    return -1
7a6771
+}
7a6771
+
7a6771
+# Get things started.
7a6771
+
7a6771
+gdb_exit
7a6771
+gdb_start
7a6771
+gdb_reinitialize_dir $srcdir/$subdir
7a6771
+gdb_load ${binfile}
7a6771
+
7a6771
+# For C programs, "start" should stop in main().
7a6771
+
7a6771
+gdb_test "start" \
7a6771
+         "main \\(\\) at .*$srcfile.*" \
7a6771
+         "start"
7a6771
+
7a6771
+# main () at hello2.c:5
7a6771
+# 5		puts("hello world\n");
7a6771
+# (gdb) next
7a6771
+# 0x100007e0 in call___do_global_ctors_aux ()
7a6771
+
7a6771
+gdb_test_multiple "next" "invalid `next' output" {
7a6771
+	-re "\nhello world.*return 0;.*" {
7a6771
+		pass "stepped over"
7a6771
+	}
7a6771
+	-re " in call___do_global_ctors_aux \\(\\).*" {
7a6771
+		fail "stepped into trampoline"
7a6771
+	}
7a6771
+}
7a6771
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/step-over-trampoline.c
7a6771
===================================================================
7a6771
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
7a6771
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/step-over-trampoline.c	2016-02-15 23:30:54.698858518 +0100
7a6771
@@ -0,0 +1,28 @@
7a6771
+/* This testcase is part of GDB, the GNU debugger.
7a6771
+
7a6771
+   Copyright 2006 Free Software Foundation, Inc.
7a6771
+
7a6771
+   This program is free software; you can redistribute it and/or modify
7a6771
+   it under the terms of the GNU General Public License as published by
7a6771
+   the Free Software Foundation; either version 2 of the License, or
7a6771
+   (at your option) any later version.
7a6771
+
7a6771
+   This program is distributed in the hope that it will be useful,
7a6771
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
7a6771
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7a6771
+   GNU General Public License for more details.
7a6771
+ 
7a6771
+   You should have received a copy of the GNU General Public License
7a6771
+   along with this program; if not, write to the Free Software
7a6771
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7a6771
+
7a6771
+   Please email any bugs, comments, and/or additions to this file to:
7a6771
+   bug-gdb@prep.ai.mit.edu  */
7a6771
+
7a6771
+#include <stdio.h>
7a6771
+
7a6771
+int main (void)
7a6771
+{
7a6771
+	puts ("hello world");
7a6771
+	return 0;
7a6771
+}