[Lldb-commits] [PATCH] D106194: Tests for: D100299: Be lazier about loading .dwo files
Jan Kratochvil via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jul 16 14:38:25 PDT 2021
jankratochvil updated this revision to Diff 359458.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106194/new/
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,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
Index: lldb/test/Shell/ObjectFile/ELF/split-lazy-load.test
===================================================================
--- /dev/null
+++ 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,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106194.359458.patch
Type: text/x-patch
Size: 1570 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210716/af0e4f86/attachment.bin>
More information about the lldb-commits
mailing list