diff --git a/lldb/test/Shell/ObjectFile/ELF/split-lazy-load.test b/lldb/test/Shell/ObjectFile/ELF/split-lazy-load.test new file mode 100644 --- /dev/null +++ b/lldb/test/Shell/ObjectFile/ELF/split-lazy-load.test @@ -0,0 +1,11 @@ +# RUN: rm -rf %t +# RUN: mkdir %t +# RUN: echo 'int main(void) { return 0; }' >%t/1.c +# RUN: echo 'int x;' >%t/2.c +# RUN: %clangxx_host -gdwarf-5 -gsplit-dwarf -gpubnames -o %t/main %t/1.c %t/2.c +# RUN: %lldb -b %t/main -o 'log enable ll''db object' -o 'b main' | FileCheck %s + +# CHECK: (lldb) b main +# CHECK-NOT: /2.dwo, +# CHECK: /1.dwo, +# CHECK-NOT: /2.dwo, diff --git a/lldb/test/Shell/ObjectFile/ELF/split-optimized.test b/lldb/test/Shell/ObjectFile/ELF/split-optimized.test new file mode 100644 --- /dev/null +++ b/lldb/test/Shell/ObjectFile/ELF/split-optimized.test @@ -0,0 +1,17 @@ +# RUN: rm -rf %t +# RUN: mkdir %t +# RUN: cd %t +# RUN: echo 'int main(void) { return 0; }' >appleopt.c +# RUN: %clangxx_host -gdwarf-5 -glldb -gsplit-dwarf -O3 -o appleopt.o appleopt.c +# RUN: llvm-dwarfdump appleopt.o | FileCheck %s --check-prefix DWARFDUMP_O +# RUN: llvm-dwarfdump appleopt.dwo | FileCheck %s --check-prefix DWARFDUMP_DWO +# RUN: %lldb -b -o 'script lldb.SBDebugger.Create().CreateTarget("appleopt.o").FindFunctions("main",lldb.eFunctionNameTypeAuto).GetContextAtIndex(0).GetFunction().GetIsOptimized()' | FileCheck %s + +# DWARFDUMP_O-NOT: DW_AT_APPLE_optimized +# +# DWARFDUMP_DWO: DW_TAG_compile_unit +# DWARFDUMP_DWO-NOT: DW_TAG_ +# DWARFDUMP_DWO: DW_AT_APPLE_optimized (true) + +# CHECK: (lldb) script lldb.SBDebugger.Create() +# CHECK-NEXT: True