Use add_partial_symbol in load_partial_dies
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.trace / actions.c
index e8df6148461740e7c1f3dc2c2a20a7c96fb60c78..6b1aba1d607fe7f92be9d813c64bb1872c114816 100644 (file)
@@ -1,7 +1,28 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 1998-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
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   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/>.  */
+
 /*
  * Test program for trace action commands
  */
 
+#include <string.h>
+
+#include "trace-common.h"
+
 static char   gdb_char_test;
 static short  gdb_short_test;
 static long   gdb_long_test;
@@ -27,6 +48,11 @@ static union GDB_UNION_TEST
 } gdb_union1_test;
 
 void gdb_recursion_test (int, int, int, int,  int,  int,  int);
+/* This function pointer is used to force the function to be called via
+   the global entry instead of local entry on ppc64le; otherwise, breakpoints
+   set at the global entry (i.e., '*foo') will not be hit.  */
+typedef void (*gdb_recursion_test_fp) (int, int, int, int,  int,  int,  int);
+gdb_recursion_test_fp gdb_recursion_test_ptr = gdb_recursion_test;
 
 void gdb_recursion_test (int depth, 
                         int q1, 
@@ -45,7 +71,7 @@ void gdb_recursion_test (int depth,
   q5 = q6;                                             /* gdbtestline 6 */
   q6 = q;                                              /* gdbtestline 7 */
   if (depth--)                                         /* gdbtestline 8 */
-    gdb_recursion_test (depth, q1, q2, q3, q4, q5, q6);        /* gdbtestline 9 */
+    gdb_recursion_test_ptr (depth, q1, q2, q3, q4, q5, q6);    /* gdbtestline 9 */
 }
 
 
@@ -53,15 +79,15 @@ unsigned long   gdb_c_test( unsigned long *parm )
 
 {
    char *p = "gdb_c_test";
-   char *rediculously_long_variable_name_with_equally_long_string_assignment;
+   char *ridiculously_long_variable_name_with_equally_long_string_assignment;
    register long local_reg = 7;
    static unsigned long local_static, local_static_sizeof;
    long local_long;
    unsigned long *stack_ptr;
    unsigned long end_of_stack;
 
-   rediculously_long_variable_name_with_equally_long_string_assignment = 
-     "rediculously long variable name with equally long string assignment";
+   ridiculously_long_variable_name_with_equally_long_string_assignment = 
+     "ridiculously long variable name with equally long string assignment";
    local_static = 9;
    local_static_sizeof = sizeof (struct GDB_STRUCT_TEST);
    local_long = local_reg + 1;
@@ -84,7 +110,7 @@ unsigned long   gdb_c_test( unsigned long *parm )
    gdb_structp_test      = &gdb_struct1_test;
    gdb_structpp_test     = &gdb_structp_test;
 
-   gdb_recursion_test (3, (long) parm[1], (long) parm[2], (long) parm[3],
+   gdb_recursion_test_ptr (3, (long) parm[1], (long) parm[2], (long) parm[3],
                       (long) parm[4], (long) parm[5], (long) parm[6]);
 
    gdb_char_test = gdb_short_test = gdb_long_test = 0;
@@ -97,7 +123,7 @@ unsigned long   gdb_c_test( unsigned long *parm )
    return ( (unsigned long) 0 );
 }
 
-static void gdb_asm_test (void)
+void gdb_asm_test (void)
 {
 }
 
@@ -117,10 +143,7 @@ main (argc, argv, envp)
   int i;
   unsigned long myparms[10];
 
-#ifdef usestubs
-  set_debug_traps ();
-  breakpoint ();
-#endif
+  FAST_TRACEPOINT_LABEL (fast_tracepoint_loc);
 
   begin ();
   for (i = 0; i < sizeof (myparms) / sizeof (myparms[0]); i++)
This page took 0.026846 seconds and 4 git commands to generate.