/* This testcase is part of GDB, the GNU debugger.
- Copyright 1998-2014 Free Software Foundation, Inc.
+ 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
#include <string.h>
+#include "trace-common.h"
+
static char gdb_char_test;
static short gdb_short_test;
static long gdb_long_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,
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 */
}
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;
int i;
unsigned long myparms[10];
+ FAST_TRACEPOINT_LABEL (fast_tracepoint_loc);
+
begin ();
for (i = 0; i < sizeof (myparms) / sizeof (myparms[0]); i++)
myparms[i] = i;