aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-12-04 15:54:59 +0100
committerPavel Labath <pavel@labath.sk>2019-12-04 17:08:23 +0100
commit92cd68f48ed14c6ee90b3ad830af3c2d7879428a (patch)
tree5808254a72241f375bd0c60293b4cde1a67a7dd0
parent72ce759928e6dfee6a9efa310b966c19722352ba (diff)
downloadllvm-92cd68f48ed14c6ee90b3ad830af3c2d7879428a.zip
llvm-92cd68f48ed14c6ee90b3ad830af3c2d7879428a.tar.gz
llvm-92cd68f48ed14c6ee90b3ad830af3c2d7879428a.tar.bz2
[lldb] Simplify debug_{rnglists,ranges}.s tests
Remove things irrelevant to the test.
-rw-r--r--lldb/test/Shell/SymbolFile/DWARF/debug_ranges.s44
-rw-r--r--lldb/test/Shell/SymbolFile/DWARF/debug_rnglists.s46
2 files changed, 34 insertions, 56 deletions
diff --git a/lldb/test/Shell/SymbolFile/DWARF/debug_ranges.s b/lldb/test/Shell/SymbolFile/DWARF/debug_ranges.s
index bbe5cb2..13eea1b 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/debug_ranges.s
+++ b/lldb/test/Shell/SymbolFile/DWARF/debug_ranges.s
@@ -3,16 +3,13 @@
# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s > %t
# RUN: %lldb %t -o "image lookup -v -s lookup_ranges" -o exit | FileCheck %s
-# CHECK: Function: id = {0x7fffffff0000001c}, name = "ranges", range = [0x0000000000000000-0x0000000000000004)
-# CHECK: Blocks: id = {0x7fffffff0000001c}, range = [0x00000000-0x00000004)
-# CHECK-NEXT: id = {0x7fffffff0000002d}, ranges = [0x00000001-0x00000002)[0x00000003-0x00000004)
+# CHECK: Function: id = {0x7fffffff0000002b}, name = "ranges", range = [0x0000000000000000-0x0000000000000004)
+# CHECK: Blocks: id = {0x7fffffff0000002b}, range = [0x00000000-0x00000004)
+# CHECK-NEXT: id = {0x7fffffff0000003f}, ranges = [0x00000001-0x00000002)[0x00000003-0x00000004)
.text
.p2align 12
- .globl ranges
- .type ranges,@function
-ranges: # @ranges
-.Lfoo_begin:
+ranges:
nop
.Lblock1_begin:
lookup_ranges:
@@ -22,21 +19,14 @@ lookup_ranges:
.Lblock2_begin:
nop
.Lblock2_end:
-.Lfunc_end0:
- .size ranges, .Lfunc_end0-ranges
- # -- End function
- .section .debug_str,"MS",@progbits,1
-.Lproducer:
- .asciz "Hand-written DWARF"
-.Lranges:
- .asciz "ranges"
+.Lranges_end:
.section .debug_abbrev,"",@progbits
.byte 1 # Abbreviation Code
.byte 17 # DW_TAG_compile_unit
.byte 1 # DW_CHILDREN_yes
.byte 37 # DW_AT_producer
- .byte 14 # DW_FORM_strp
+ .byte 8 # DW_FORM_string
.byte 17 # DW_AT_low_pc
.byte 1 # DW_FORM_addr
.byte 18 # DW_AT_high_pc
@@ -51,7 +41,7 @@ lookup_ranges:
.byte 18 # DW_AT_high_pc
.byte 6 # DW_FORM_data4
.byte 3 # DW_AT_name
- .byte 14 # DW_FORM_strp
+ .byte 8 # DW_FORM_string
.byte 0 # EOM(1)
.byte 0 # EOM(2)
.byte 5 # Abbreviation Code
@@ -71,13 +61,13 @@ lookup_ranges:
.long .debug_abbrev # Offset Into Abbrev. Section
.byte 8 # Address Size (in bytes)
.byte 1 # Abbrev [1] 0xb:0x7b DW_TAG_compile_unit
- .long .Lproducer # DW_AT_producer
- .quad .Lfoo_begin # DW_AT_low_pc
- .long .Lfunc_end0-.Lfoo_begin # DW_AT_high_pc
+ .asciz "Hand-written DWARF" # DW_AT_producer
+ .quad ranges # DW_AT_low_pc
+ .long .Lranges_end-ranges # DW_AT_high_pc
.byte 2 # Abbrev [2] 0x2a:0x4d DW_TAG_subprogram
- .quad .Lfoo_begin # DW_AT_low_pc
- .long .Lfunc_end0-.Lfoo_begin # DW_AT_high_pc
- .long .Lranges # DW_AT_name
+ .quad ranges # DW_AT_low_pc
+ .long .Lranges_end-ranges # DW_AT_high_pc
+ .asciz "ranges" # DW_AT_name
.byte 5 # Abbrev [5] 0x61:0x15 DW_TAG_lexical_block
.long .Ldebug_ranges0 # DW_AT_ranges
.byte 0 # End Of Children Mark
@@ -86,9 +76,9 @@ lookup_ranges:
.section .debug_ranges,"",@progbits
.Ldebug_ranges0:
- .quad .Lblock1_begin-.Lfoo_begin
- .quad .Lblock1_end-.Lfoo_begin
- .quad .Lblock2_begin-.Lfoo_begin
- .quad .Lblock2_end-.Lfoo_begin
+ .quad .Lblock1_begin-ranges
+ .quad .Lblock1_end-ranges
+ .quad .Lblock2_begin-ranges
+ .quad .Lblock2_end-ranges
.quad 0
.quad 0
diff --git a/lldb/test/Shell/SymbolFile/DWARF/debug_rnglists.s b/lldb/test/Shell/SymbolFile/DWARF/debug_rnglists.s
index 5d95b80..7daa32d 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/debug_rnglists.s
+++ b/lldb/test/Shell/SymbolFile/DWARF/debug_rnglists.s
@@ -3,16 +3,13 @@
# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s > %t
# RUN: %lldb %t -o "image lookup -v -s lookup_rnglists" -o exit | FileCheck %s
-# CHECK: Function: id = {0x7fffffff00000021}, name = "rnglists", range = [0x0000000000000000-0x0000000000000004)
-# CHECK: Blocks: id = {0x7fffffff00000021}, range = [0x00000000-0x00000004)
-# CHECK-NEXT: id = {0x7fffffff00000032}, ranges = [0x00000001-0x00000002)[0x00000003-0x00000004)
+# CHECK: Function: id = {0x7fffffff00000030}, name = "rnglists", range = [0x0000000000000000-0x0000000000000004)
+# CHECK: Blocks: id = {0x7fffffff00000030}, range = [0x00000000-0x00000004)
+# CHECK-NEXT: id = {0x7fffffff00000046}, ranges = [0x00000001-0x00000002)[0x00000003-0x00000004)
.text
.p2align 12
- .globl rnglists
- .type rnglists,@function
-rnglists: # @rnglists
-.Lfoo_begin:
+rnglists:
nop
.Lblock1_begin:
lookup_rnglists:
@@ -22,21 +19,14 @@ lookup_rnglists:
.Lblock2_begin:
nop
.Lblock2_end:
-.Lfunc_end0:
- .size rnglists, .Lfunc_end0-rnglists
- # -- End function
- .section .debug_str,"MS",@progbits,1
-.Lproducer:
- .asciz "Hand-written DWARF"
-.Lrnglists:
- .asciz "rnglists"
+.Lrnglists_end:
.section .debug_abbrev,"",@progbits
.byte 1 # Abbreviation Code
.byte 17 # DW_TAG_compile_unit
.byte 1 # DW_CHILDREN_yes
.byte 37 # DW_AT_producer
- .byte 14 # DW_FORM_strp
+ .byte 8 # DW_FORM_string
.byte 17 # DW_AT_low_pc
.byte 1 # DW_FORM_addr
.byte 18 # DW_AT_high_pc
@@ -53,7 +43,7 @@ lookup_rnglists:
.byte 18 # DW_AT_high_pc
.byte 6 # DW_FORM_data4
.byte 3 # DW_AT_name
- .byte 14 # DW_FORM_strp
+ .byte 8 # DW_FORM_string
.byte 0 # EOM(1)
.byte 0 # EOM(2)
.byte 5 # Abbreviation Code
@@ -74,14 +64,14 @@ lookup_rnglists:
.byte 8 # Address Size (in bytes)
.long .debug_abbrev # Offset Into Abbrev. Section
.byte 1 # Abbrev [1] 0xc:0x5f DW_TAG_compile_unit
- .long .Lproducer # DW_AT_producer
- .quad .Lfoo_begin # DW_AT_low_pc
- .long .Lfunc_end0-.Lfoo_begin # DW_AT_high_pc
+ .asciz "Hand-written DWARF" # DW_AT_producer
+ .quad rnglists # DW_AT_low_pc
+ .long .Lrnglists_end-rnglists # DW_AT_high_pc
.long .Lrnglists_table_base0 # DW_AT_rnglists_base
.byte 2 # Abbrev [2] 0x2b:0x37 DW_TAG_subprogram
- .quad .Lfoo_begin # DW_AT_low_pc
- .long .Lfunc_end0-.Lfoo_begin # DW_AT_high_pc
- .long .Lrnglists # DW_AT_name
+ .quad rnglists # DW_AT_low_pc
+ .long .Lrnglists_end-rnglists # DW_AT_high_pc
+ .asciz "rnglists" # DW_AT_name
.byte 5 # Abbrev [5] 0x52:0xf DW_TAG_lexical_block
.byte 0 # DW_AT_ranges
.byte 0 # End Of Children Mark
@@ -99,12 +89,10 @@ lookup_rnglists:
.long .Ldebug_ranges0-.Lrnglists_table_base0
.Ldebug_ranges0:
.byte 4 # DW_RLE_offset_pair
- .uleb128 .Lblock1_begin-.Lfoo_begin # starting offset
- .uleb128 .Lblock1_end-.Lfoo_begin # ending offset
+ .uleb128 .Lblock1_begin-rnglists # starting offset
+ .uleb128 .Lblock1_end-rnglists # ending offset
.byte 4 # DW_RLE_offset_pair
- .uleb128 .Lblock2_begin-.Lfoo_begin # starting offset
- .uleb128 .Lblock2_end-.Lfoo_begin # ending offset
+ .uleb128 .Lblock2_begin-rnglists # starting offset
+ .uleb128 .Lblock2_end-rnglists # ending offset
.byte 0 # DW_RLE_end_of_list
.Ldebug_rnglist_table_end0:
- .section .debug_macinfo,"",@progbits
- .byte 0 # End Of Macro List Mark