summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/with-debug.c
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2020-08-03 14:33:06 +0000
committerpatrick <patrick@openbsd.org>2020-08-03 14:33:06 +0000
commit061da546b983eb767bad15e67af1174fb0bcf31c (patch)
tree83c78b820819d70aa40c36d90447978b300078c5 /gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/with-debug.c
parentImport LLVM 10.0.0 release including clang, lld and lldb. (diff)
downloadwireguard-openbsd-061da546b983eb767bad15e67af1174fb0bcf31c.tar.xz
wireguard-openbsd-061da546b983eb767bad15e67af1174fb0bcf31c.zip
Import LLVM 10.0.0 release including clang, lld and lldb.
ok hackroom tested by plenty
Diffstat (limited to 'gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/with-debug.c')
-rw-r--r--gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/with-debug.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/with-debug.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/with-debug.c
new file mode 100644
index 00000000000..c7ac309d2c1
--- /dev/null
+++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/with-debug.c
@@ -0,0 +1,29 @@
+#include <stdio.h>
+
+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;
+}