strace/tests/stack-fcall-3.c
Eugene Syromyatnikov 750cdcba9c tests: check stack unwinding for signals
* tests/stack-fcall-3.c: Include <signal.h>.
(f3): Call getpid or kill depending on the argument, store getpid result.
* tests/stack-fcall.c (main): Remove arguments, call f0(0) and f0(1).
* tests/strace-k-demangle.expected: Update expected output.
* tests/strace-k.expected: Likewise.
* tests/strace-k.test: Rewrite pattern matching code.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-09-03 12:05:48 +00:00

19 lines
200 B
C

#include <signal.h>
#include <unistd.h>
#include "stack-fcall.h"
int f3(int i)
{
static int pid;
switch (i) {
case 1:
return kill(pid, SIGURG);
default:
return (pid = getpid()) + i;
}
}