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

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