Update copyright year range in all GDB files.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / step-bt.c
index 18c440d568eefde8ab3711871d2603348a97b37b..c447adf1d1b449930e9aceb6947c9dc606f50342 100644 (file)
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2006, 2007 Free Software Foundation, Inc.
+   Copyright 2006-2020 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-   Please email any bugs, comments, and/or additions to this file to:
-   bug-gdb@prep.ai.mit.edu  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <stdio.h>
 
@@ -26,10 +23,19 @@ hello (void)
   printf ("Hello world.\n");
 }
 
+/* The test case uses "break *hello" to make sure to step at the very
+   first instruction of the function.  This causes a problem running
+   the test on powerpc64le-linux, since the first instruction belongs
+   to the global entry point prologue, which is skipped when doing a
+   local direct function call.  To make sure that first instruction is
+   indeed being executed and the breakpoint hits, we make sure to call
+   the routine via an indirect call.  */
+void (*ptr) (void) = hello;
+
 int
 main (void)
 {
-  hello ();
+  ptr ();
 
   return 0;
 }
This page took 0.025064 seconds and 4 git commands to generate.