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