jankratochvil created this revision. jankratochvil added reviewers: Eric, dblaikie. jankratochvil added a project: LLDB. Herald added subscribers: JDevlieghere, emaste. jankratochvil requested review of this revision. Herald added a subscriber: MaskRay.
D100299 <https://reviews.llvm.org/D100299> Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D106194 Files: lldb/test/Shell/ObjectFile/ELF/split-lazy-load.test lldb/test/Shell/ObjectFile/ELF/split-optimized.test Index: lldb/test/Shell/ObjectFile/ELF/split-optimized.test =================================================================== --- /dev/null +++ lldb/test/Shell/ObjectFile/ELF/split-optimized.test @@ -0,0 +1,18 @@ +# REQUIRES: x86 +# RUN: rm -rf %t +# RUN: mkdir %t +# RUN: cd %t +# RUN: echo 'int main(void) { return 0; }' >appleopt.c +# RUN: %clang --target=x86_64-pc-linux -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 Index: lldb/test/Shell/ObjectFile/ELF/split-lazy-load.test =================================================================== --- /dev/null +++ lldb/test/Shell/ObjectFile/ELF/split-lazy-load.test @@ -0,0 +1,12 @@ +# REQUIRES: x86 +# 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: %clang -gdwarf-5 -gsplit-dwarf -gpubnames --target=x86_64-pc-linux -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,
Index: lldb/test/Shell/ObjectFile/ELF/split-optimized.test =================================================================== --- /dev/null +++ lldb/test/Shell/ObjectFile/ELF/split-optimized.test @@ -0,0 +1,18 @@ +# REQUIRES: x86 +# RUN: rm -rf %t +# RUN: mkdir %t +# RUN: cd %t +# RUN: echo 'int main(void) { return 0; }' >appleopt.c +# RUN: %clang --target=x86_64-pc-linux -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 Index: lldb/test/Shell/ObjectFile/ELF/split-lazy-load.test =================================================================== --- /dev/null +++ lldb/test/Shell/ObjectFile/ELF/split-lazy-load.test @@ -0,0 +1,12 @@ +# REQUIRES: x86 +# 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: %clang -gdwarf-5 -gsplit-dwarf -gpubnames --target=x86_64-pc-linux -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,
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits