summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.cpp
diff options
context:
space:
mode:
authorTamas Berghammer <tberghammer@google.com>2015-12-11 16:24:14 +0000
committerTamas Berghammer <tberghammer@google.com>2015-12-11 16:24:14 +0000
commite43482b626b5f8e8fe85aad0c91fd8e637f67cd4 (patch)
tree45a6102b113f507e6ffea6d03932b7ed30d46054 /lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.cpp
parent734a0b3f81e24d106e1e4b46d000a11f865a42e6 (diff)
downloadbcm5719-llvm-e43482b626b5f8e8fe85aad0c91fd8e637f67cd4.tar.gz
bcm5719-llvm-e43482b626b5f8e8fe85aad0c91fd8e637f67cd4.zip
Create test for llvm.org/pr25806
LLDB don't detect the loading of a shared object file linked against the main executable before the static initializers are executed for the given module. Because of this it is not possible to get breakpoint hits in these static initializers and to display proper debug info in case of a crash in these codes. llvm-svn: 255342
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.cpp')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.cpp b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.cpp
new file mode 100644
index 00000000000..235749aef74
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.cpp
@@ -0,0 +1,22 @@
+//===-- a.c -----------------------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+extern int b_function ();
+
+int a_init()
+{
+ return 234;
+}
+
+int a_global = a_init();
+
+extern "C" int
+a_function ()
+{
+ return b_function ();
+}
OpenPOWER on IntegriCloud