aboutsummaryrefslogtreecommitdiff
path: root/debug/tst-backtrace5.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>2013-08-20 15:01:59 -0500
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>2013-08-20 15:05:49 -0500
commitd400dcac5e66047f86291d1a4b90fffb6327dc43 (patch)
treed2ff562dde1ad639f96e9fbe163e07b94d782854 /debug/tst-backtrace5.c
parentc980f2f4fe0f5d301f706017a1f7e4e942193ec0 (diff)
downloadglibc-d400dcac5e66047f86291d1a4b90fffb6327dc43.zip
glibc-d400dcac5e66047f86291d1a4b90fffb6327dc43.tar.gz
glibc-d400dcac5e66047f86291d1a4b90fffb6327dc43.tar.bz2
PowerPC: fix backtrace to handle signal trampolines
This patch fixes backtrace for PPC32 and PPC64 to correctly handle signal trampolines. The 'debug/tst-backtrace6.c' also check for SA_SIGINFO handling, where is triggers another vDSO symbols for PPC32.
Diffstat (limited to 'debug/tst-backtrace5.c')
-rw-r--r--debug/tst-backtrace5.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/debug/tst-backtrace5.c b/debug/tst-backtrace5.c
index ca47437..51180c1 100644
--- a/debug/tst-backtrace5.c
+++ b/debug/tst-backtrace5.c
@@ -28,6 +28,10 @@
#include "tst-backtrace.h"
+#ifndef SIGACTION_FLAGS
+# define SIGACTION_FLAGS 0
+#endif
+
static int do_test (void);
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
@@ -91,7 +95,7 @@ handle_signal (int signum)
}
NO_INLINE int
-fn (int c)
+fn (int c, int flags)
{
pid_t parent_pid, child_pid;
int pipefd[2];
@@ -100,12 +104,13 @@ fn (int c)
if (c > 0)
{
- fn (c - 1);
+ fn (c - 1, flags);
return x;
}
memset (&act, 0, sizeof (act));
act.sa_handler = handle_signal;
+ act.sa_flags = flags;
sigemptyset (&act.sa_mask);
sigaction (SIGUSR1, &act, NULL);
parent_pid = getpid ();
@@ -131,6 +136,6 @@ fn (int c)
NO_INLINE static int
do_test (void)
{
- fn (2);
+ fn (2, SIGACTION_FLAGS);
return ret;
}