diff options
| author | Tamas Berghammer <tberghammer@google.com> | 2015-12-11 16:24:14 +0000 |
|---|---|---|
| committer | Tamas Berghammer <tberghammer@google.com> | 2015-12-11 16:24:14 +0000 |
| commit | e43482b626b5f8e8fe85aad0c91fd8e637f67cd4 (patch) | |
| tree | 45a6102b113f507e6ffea6d03932b7ed30d46054 /lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden | |
| parent | 734a0b3f81e24d106e1e4b46d000a11f865a42e6 (diff) | |
| download | bcm5719-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/hidden')
| -rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/Makefile | 4 | ||||
| -rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/d.cpp (renamed from lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/d.c) | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/Makefile index 09aa39b378e..f84d8300843 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/Makefile @@ -3,7 +3,9 @@ LEVEL := ../../../make LIB_PREFIX := loadunload_ DYLIB_NAME := $(LIB_PREFIX)d -DYLIB_C_SOURCES := d.c +DYLIB_CXX_SOURCES := d.cpp DYLIB_ONLY := YES +CXXFLAGS += -fPIC + include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/d.c b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/d.cpp index f20aa095f2f..6a7642c08b9 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/d.c +++ b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/d.cpp @@ -6,6 +6,14 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// + +int d_init() +{ + return 456; +} + +int d_global = d_init(); + int d_function () { // Find this line number within d_dunction(). |

