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

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