brintos

brintos / llvm-project-archived public Read only

0
0
Text · 8.3 KiB · 227ca9e Raw
188 lines · plain
1## This tests if .debug_rnglists.dwo are correctly read if they are part2## of a dwp file.3 4# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s --defsym MAIN=0 > %t5# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s > %t.dwp6# RUN: %lldb %t -o "image lookup -v -s lookup_rnglists" -o exit | FileCheck %s7 8# CHECK-LABEL: image lookup -v -s lookup_rnglists9# CHECK:  Function: id = {{.*}}, name = "rnglists", range = [0x0000000000000000-0x0000000000000003)10# CHECK:    Blocks: id = {{.*}}, range = [0x00000000-0x00000003)11# CHECK-NEXT:       id = {{.*}}, range = [0x00000001-0x00000002)12 13        .text14rnglists:15        nop16.Lblock1_begin:17lookup_rnglists:18        nop19.Lblock1_end:20        nop21.Lrnglists_end:22 23## The main file.24.ifdef MAIN25        .section        .debug_abbrev,"",@progbits26        .byte   1                       # Abbreviation Code27        .byte   17                      # DW_TAG_compile_unit28        .byte   0                       # DW_CHILDREN_no29        .byte   0x76                    # DW_AT_dwo_name30        .byte   8                       # DW_FORM_string31        .byte   115                     # DW_AT_addr_base32        .byte   23                      # DW_FORM_sec_offset33        .byte   85                      # DW_AT_ranges34        .byte   35                      # DW_FORM_rnglistx35        .byte   116                     # DW_AT_rnglists_base36        .byte   23                      # DW_FORM_sec_offset37        .byte   0                       # EOM(1)38        .byte   0                       # EOM(2)39        .byte   0                       # EOM(3)40 41        .section        .debug_info,"",@progbits42.Lcu_begin0:43        .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit44.Ldebug_info_start0:45        .short  5                       # DWARF version number46        .byte   4                       # DWARF Unit Type47        .byte   8                       # Address Size (in bytes)48        .long   .debug_abbrev           # Offset Into Abbrev. Section49        .quad   1026699901672188186     # DWO id50        .byte   1                       # Abbrev [1] DW_TAG_compile_unit51        .asciz  "debug_rnglists-dwp.s.tmp.dwo"  # DW_AT_dwo_name52        .long   .Laddr_table_base0      # DW_AT_addr_base53        .byte   0                       # DW_AT_ranges54        .long   .Lskel_rnglists_table_base # DW_AT_rnglists_base55.Ldebug_info_end0:56 57        .section        .debug_addr,"",@progbits58        .long   .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution59.Ldebug_addr_start0:60        .short  5                       # DWARF version number61        .byte   8                       # Address size62        .byte   0                       # Segment selector size63.Laddr_table_base0:64        .quad   rnglists65        .quad   .Lblock1_begin66.Ldebug_addr_end0:67 68        .section        .debug_rnglists,"",@progbits69        .long   .Lskel_rnglist_table_end-.Lskel_rnglist_table_start # Length70.Lskel_rnglist_table_start:71        .short  5                       # Version72        .byte   8                       # Address size73        .byte   0                       # Segment selector size74        .long   1                       # Offset entry count75.Lskel_rnglists_table_base:76        .long   .Lskel_ranges0-.Lskel_rnglists_table_base77.Lskel_ranges0:78        .byte   7                       # DW_RLE_start_length79        .quad   rnglists80        .uleb128   .Lrnglists_end-rnglists81        .byte   0                       # DW_RLE_end_of_list82.Lskel_rnglist_table_end:83 .else84 ## DWP file starts here.85        .section        .debug_abbrev.dwo,"e",@progbits86.LAbbrevBegin:87        .byte   1                       # Abbreviation Code88        .byte   17                      # DW_TAG_compile_unit89        .byte   1                       # DW_CHILDREN_yes90        .byte   37                      # DW_AT_producer91        .byte   8                       # DW_FORM_string92        .byte   0                       # EOM(1)93        .byte   0                       # EOM(2)94        .byte   2                       # Abbreviation Code95        .byte   46                      # DW_TAG_subprogram96        .byte   1                       # DW_CHILDREN_yes97        .byte   17                      # DW_AT_low_pc98        .byte   27                      # DW_FORM_addrx99        .byte   18                      # DW_AT_high_pc100        .byte   6                       # DW_FORM_data4101        .byte   3                       # DW_AT_name102        .byte   8                       # DW_FORM_string103        .byte   0                       # EOM(1)104        .byte   0                       # EOM(2)105        .byte   5                       # Abbreviation Code106        .byte   11                      # DW_TAG_lexical_block107        .byte   0                       # DW_CHILDREN_no108        .byte   85                      # DW_AT_ranges109        .byte   35                      # DW_FORM_rnglistx110        .byte   0                       # EOM(1)111        .byte   0                       # EOM(2)112        .byte   0                       # EOM(3)113.LAbbrevEnd:114        .section        .debug_info.dwo,"e",@progbits115.LCUBegin:116        .long   .Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit117.Ldebug_info_start1:118        .short  5                       # DWARF version number119        .byte   5                       # DWARF Unit Type120        .byte   8                       # Address Size (in bytes)121        .long   0                       # Offset Into Abbrev. Section122        .quad   1026699901672188186      # DWO id123        .byte   1                       # Abbrev [1] DW_TAG_compile_unit124        .asciz  "Hand-written DWARF"    # DW_AT_producer125        .byte   2                       # Abbrev [2] DW_TAG_subprogram126        .byte   0                       # DW_AT_low_pc127        .long   .Lrnglists_end-rnglists # DW_AT_high_pc128        .asciz  "rnglists"              # DW_AT_name129        .byte   5                       # Abbrev [5] DW_TAG_lexical_block130        .byte   0                       # DW_AT_ranges131        .byte   0                       # End Of Children Mark132        .byte   0                       # End Of Children Mark133.Ldebug_info_end1:134.LCUEnd:135        .section        .debug_rnglists.dwo,"e",@progbits136## Fake rnglists to check if the cu index is taken into account137        .long   .Lfake_rnglist_end-.Lfake_rnglist_start # Length138.Lfake_rnglist_start:139        .short  5                       # Version140        .byte   8                       # Address size141        .byte   0                       # Segment selector size142        .long   0                       # Offset entry count143        .byte   0                       # DW_RLE_end_of_list144.Lfake_rnglist_end:145.LRLBegin:146        .long   .Ldwo_rnglist_table_end-.Ldwo_rnglist_table_start # Length147.Ldwo_rnglist_table_start:148        .short  5                       # Version149        .byte   8                       # Address size150        .byte   0                       # Segment selector size151        .long   1                       # Offset entry count152.Ldwo_rnglists_table_base:153        .long   .Ldwo_ranges-.Ldwo_rnglists_table_base154.Ldwo_ranges:155        .byte   3                       # DW_RLE_startx_length156        .uleb128 1157        .uleb128 .Lblock1_end-.Lblock1_begin158        .byte   0                       # DW_RLE_end_of_list159.Ldwo_rnglist_table_end:160.LRLEnd:161        .section .debug_cu_index, "", @progbits162## Header:163        .short 5                        # Version164        .short 0                        # Padding165        .long 3                         # Section count166        .long 1                         # Unit count167        .long 2                         # Slot count168## Hash Table of Signatures:169        .quad 1026699901672188186170        .quad 0171## Parallel Table of Indexes:172        .long 1173        .long 0174## Table of Section Offsets:175## Row 0:176        .long 1                         # DW_SECT_INFO177        .long 3                         # DW_SECT_ABBREV178        .long 8                         # DW_SECT_RNGLISTS179## Row 1:180        .long 0                         # Offset in .debug_info.dwo181        .long 0                         # Offset in .debug_abbrev.dwo182        .long .LRLBegin-.debug_rnglists.dwo # Offset in .debug_rnglists.dwo183## Table of Section Sizes:184        .long .LCUEnd-.LCUBegin         # Size in .debug_info.dwo185        .long .LAbbrevEnd-.LAbbrevBegin # Size in .debug_abbrev.dwo186        .long .LRLEnd-.LRLBegin         # Size in .debug_rnglists.dwo187.endif188