aboutsummaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/foo.c
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/foo.c')
-rw-r--r--packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/foo.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/foo.c b/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/foo.c
new file mode 100644
index 000000000000..6431bc496c30
--- /dev/null
+++ b/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/foo.c
@@ -0,0 +1,22 @@
+#include "foo.h"
+#include <stdlib.h>
+
+struct foo
+{
+ struct sub_foo sub_element;
+ int other_element;
+};
+
+struct foo *
+GetMeAFoo()
+{
+ struct foo *ret_val = (struct foo *) malloc (sizeof (struct foo));
+ ret_val->other_element = 3;
+ return ret_val;
+}
+
+struct sub_foo *
+GetMeASubFoo (struct foo *in_foo)
+{
+ return &(in_foo->sub_element);
+}