From 9e6d35490a6542f9c97607f93c2ef8ca8e03cbcc Mon Sep 17 00:00:00 2001 From: Dimitry Andric 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 --- .../step-avoids-no-debug/with-debug.c | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/with-debug.c (limited to 'packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/with-debug.c') diff --git a/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/with-debug.c b/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/with-debug.c new file mode 100644 index 0000000000000..c7ac309d2c1a4 --- /dev/null +++ b/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/with-debug.c @@ -0,0 +1,29 @@ +#include + +typedef int (*debug_callee) (int); + +extern int no_debug_caller (int, debug_callee); + +int +called_from_nodebug_actual(int some_value) +{ + int return_value = 0; + return_value = printf ("Length: %d.\n", some_value); + return return_value; // Stop here and step out of me +} + +int +called_from_nodebug(int some_value) +{ + int intermediate_return_value = 0; + intermediate_return_value = called_from_nodebug_actual(some_value); + return intermediate_return_value; +} + +int +main() +{ + int return_value = no_debug_caller(5, called_from_nodebug); + printf ("I got: %d.\n", return_value); + return 0; +} -- cgit v1.2.3