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

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