From 78b9749c0a4ea980a8b934645da6ae98fcc665e8 Mon Sep 17 00:00:00 2001 From: dim Date: Wed, 6 Jan 2016 20:12:03 +0000 Subject: Vendor import of lldb trunk r256945: https://llvm.org/svn/llvm-project/lldb/trunk@256945 --- .../test/functionalities/unwind/sigtramp/main.c | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/main.c (limited to 'packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/main.c') diff --git a/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/main.c b/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/main.c new file mode 100644 index 0000000..aaa03e7 --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/main.c @@ -0,0 +1,27 @@ +#include +#include +#include +#include + +void handler (int in) +{ + puts ("in handler routine"); + while (1) + ; +} + +void +foo () +{ + puts ("in foo ()"); + kill (getpid(), SIGUSR1); +} +int main () +{ + puts ("in main"); // Set breakpoint here + signal (SIGUSR1, handler); + puts ("signal handler set up"); + foo(); + puts ("exiting"); + return 0; +} -- cgit v1.1