================
@@ -0,0 +1,100 @@
+## This test checks that lldb handles (corrupt?) debug info which has 
improperly
+## nested blocks. The behavior here is not prescriptive. We only want to check
+## that we do something "reasonable".
+
+
+# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s > %t
+# RUN: %lldb %t -o "image lookup -v -s look_me_up1" \
+# RUN:   -o "image lookup -v -s look_me_up2" -o exit 2>&1 | FileCheck %s
+
+# CHECK-LABEL: image lookup -v -s look_me_up1
+# CHECK: warning: {{.*}} block 0x55 has a range [0x2, 0x4) which is not 
contained in the parent block 0x44
+# CHECK:    Function: id = {0x00000030}, name = "fn", range = 
[0x0000000000000000-0x0000000000000005)
+# CHECK:      Blocks: id = {0x00000030}, range = [0x00000000-0x00000005)
+# CHECK-NEXT:         id = {0x00000044}, range = [0x00000001-0x00000003)
+# CHECK-NEXT:         id = {0x00000055}, range = [0x00000002-0x00000004)
+# CHECK-NEXT: Symbol:
+
+# CHECK-LABEL: image lookup -v -s look_me_up2
+# CHECK:    Function: id = {0x00000030}, name = "fn", range = 
[0x0000000000000000-0x0000000000000005)
+# CHECK:      Blocks: id = {0x00000030}, range = [0x00000000-0x00000005)
+# CHECK-NEXT: Symbol:
+
+        .text
+        .p2align 12
+fn:
+        nop
+.Lblock1_begin:
+        nop
+.Lblock2_begin:
+look_me_up1:
+        nop
+.Lblock1_end:
+look_me_up2:
+        nop
+.Lblock2_end:
+        nop
+.Lfn_end:
+
+
+        .section        .debug_abbrev,"",@progbits
----------------
DavidSpickett wrote:

Add a comment that this DWARF is correctly representing the function above, but 
the function itself is the source of the problem we're handling.

Or if it is in the DWARF, the opposite comment.

https://github.com/llvm/llvm-project/pull/117725
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to