Skip to content

Commit

Permalink
[BOLT][DWARF] Fix incorrect DW_AT_type offset for unittest
Browse files Browse the repository at this point in the history
Some unit tests has incorrect DW_AT_type offset since they are manual crafted, fix them to the correct offset.

Reviewed By: Amir, ayermolo

Differential Revision: https://reviews.llvm.org/D129828
  • Loading branch information
zr33 authored and ayermolo committed Jul 18, 2022
1 parent 66a41e0 commit 1a1324a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions bolt/test/X86/Inputs/dwarf4-split-dwarf-no-address-helper.s
Expand Up @@ -111,7 +111,7 @@ _Z6helperi: # @_Z6helperi
.byte 1 # DW_AT_name
.byte 1 # DW_AT_decl_file
.byte 1 # DW_AT_decl_line
.long 53 # DW_AT_type
.long 48 # DW_AT_type
# DW_AT_external
.byte 3 # Abbrev [3] 0x29:0xb DW_TAG_formal_parameter
.byte 2 # DW_AT_location
Expand All @@ -120,7 +120,7 @@ _Z6helperi: # @_Z6helperi
.byte 3 # DW_AT_name
.byte 1 # DW_AT_decl_file
.byte 1 # DW_AT_decl_line
.long 53 # DW_AT_type
.long 48 # DW_AT_type
.byte 0 # End Of Children Mark
.byte 4 # Abbrev [4] 0x35:0x4 DW_TAG_base_type
.byte 2 # DW_AT_name
Expand Down
18 changes: 9 additions & 9 deletions bolt/test/X86/Inputs/dwarf5-loclist-offset-form-helper.s
Expand Up @@ -289,7 +289,7 @@ fooVar:
.long .Laddr_table_base0 # DW_AT_addr_base
.byte 2 # Abbrev [2] 0x27:0xb DW_TAG_variable
.byte 3 # DW_AT_name
.long 50 # DW_AT_type
.long 46 # DW_AT_type
# DW_AT_external
.byte 0 # DW_AT_decl_file
.byte 1 # DW_AT_decl_line
Expand All @@ -306,11 +306,11 @@ fooVar:
.byte 1 # DW_AT_frame_base
.byte 87
# DW_AT_call_all_calls
.long 74 # DW_AT_abstract_origin
.long 70 # DW_AT_abstract_origin
.byte 5 # Abbrev [5] 0x42:0x7 DW_TAG_formal_parameter
.byte 1 # DW_AT_location
.byte 85
.long 79 # DW_AT_abstract_origin
.long 75 # DW_AT_abstract_origin
.byte 0 # End Of Children Mark
.byte 6 # Abbrev [6] 0x4a:0xe DW_TAG_subprogram
.byte 5 # DW_AT_linkage_name
Expand All @@ -323,10 +323,10 @@ fooVar:
.byte 7 # DW_AT_name
.byte 0 # DW_AT_decl_file
.byte 2 # DW_AT_decl_line
.long 88 # DW_AT_type
.long 84 # DW_AT_type
.byte 0 # End Of Children Mark
.byte 8 # Abbrev [8] 0x58:0x5 DW_TAG_pointer_type
.long 50 # DW_AT_type
.long 46 # DW_AT_type
.byte 9 # Abbrev [9] 0x5d:0x31 DW_TAG_subprogram
.byte 2 # DW_AT_low_pc
.long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc
Expand All @@ -337,23 +337,23 @@ fooVar:
.byte 9 # DW_AT_name
.byte 0 # DW_AT_decl_file
.byte 6 # DW_AT_decl_line
.long 50 # DW_AT_type
.long 46 # DW_AT_type
# DW_AT_external
.byte 10 # Abbrev [10] 0x6d:0xa DW_TAG_formal_parameter
.byte 1 # DW_AT_location
.byte 85
.byte 10 # DW_AT_name
.byte 0 # DW_AT_decl_file
.byte 6 # DW_AT_decl_line
.long 50 # DW_AT_type
.long 46 # DW_AT_type
.byte 11 # Abbrev [11] 0x77:0x9 DW_TAG_variable
.long .Ldebug_loc0 # DW_AT_location
.byte 7 # DW_AT_name
.byte 0 # DW_AT_decl_file
.byte 7 # DW_AT_decl_line
.long 50 # DW_AT_type
.long 46 # DW_AT_type
.byte 12 # Abbrev [12] 0x80:0xd DW_TAG_inlined_subroutine
.long 74 # DW_AT_abstract_origin
.long 70 # DW_AT_abstract_origin
.byte 2 # DW_AT_low_pc
.long .Ltmp1-.Lfunc_begin1 # DW_AT_high_pc
.byte 0 # DW_AT_call_file
Expand Down
20 changes: 10 additions & 10 deletions bolt/test/X86/Inputs/dwarf5-loclist-offset-form-main.s
Expand Up @@ -267,14 +267,14 @@ main: # @main
.byte 7 # DW_AT_name
.byte 0 # DW_AT_decl_file
.byte 1 # DW_AT_decl_line
.long 130 # DW_AT_type
.long 132 # DW_AT_type
.byte 3 # Abbrev [3] 0x3d:0xa DW_TAG_formal_parameter
.byte 1 # DW_AT_location
.byte 84
.byte 8 # DW_AT_name
.byte 0 # DW_AT_decl_file
.byte 1 # DW_AT_decl_line
.long 130 # DW_AT_type
.long 132 # DW_AT_type
.byte 0 # End Of Children Mark
.byte 4 # Abbrev [4] 0x48:0x36 DW_TAG_subprogram
.byte 1 # DW_AT_low_pc
Expand All @@ -285,45 +285,45 @@ main: # @main
.byte 5 # DW_AT_name
.byte 0 # DW_AT_decl_file
.byte 7 # DW_AT_decl_line
.long 126 # DW_AT_type
.long 128 # DW_AT_type
# DW_AT_external
.byte 3 # Abbrev [3] 0x57:0xa DW_TAG_formal_parameter
.byte 1 # DW_AT_location
.byte 85
.byte 9 # DW_AT_name
.byte 0 # DW_AT_decl_file
.byte 7 # DW_AT_decl_line
.long 126 # DW_AT_type
.long 128 # DW_AT_type
.byte 3 # Abbrev [3] 0x61:0xa DW_TAG_formal_parameter
.byte 1 # DW_AT_location
.byte 84
.byte 10 # DW_AT_name
.byte 0 # DW_AT_decl_file
.byte 7 # DW_AT_decl_line
.long 135 # DW_AT_type
.long 137 # DW_AT_type
.byte 5 # Abbrev [5] 0x6b:0x9 DW_TAG_variable
.long .Ldebug_loc0 # DW_AT_location
.byte 7 # DW_AT_name
.byte 0 # DW_AT_decl_file
.byte 8 # DW_AT_decl_line
.long 126 # DW_AT_type
.long 128 # DW_AT_type
.byte 5 # Abbrev [5] 0x74:0x9 DW_TAG_variable
.long .Ldebug_loc1 # DW_AT_location
.byte 8 # DW_AT_name
.byte 0 # DW_AT_decl_file
.byte 9 # DW_AT_decl_line
.long 126 # DW_AT_type
.long 128 # DW_AT_type
.byte 0 # End Of Children Mark
.byte 6 # Abbrev [6] 0x7e:0x4 DW_TAG_base_type
.byte 6 # DW_AT_name
.byte 5 # DW_AT_encoding
.byte 4 # DW_AT_byte_size
.byte 7 # Abbrev [7] 0x82:0x5 DW_TAG_pointer_type
.long 126 # DW_AT_type
.long 128 # DW_AT_type
.byte 7 # Abbrev [7] 0x87:0x5 DW_TAG_pointer_type
.long 140 # DW_AT_type
.long 142 # DW_AT_type
.byte 7 # Abbrev [7] 0x8c:0x5 DW_TAG_pointer_type
.long 145 # DW_AT_type
.long 147 # DW_AT_type
.byte 6 # Abbrev [6] 0x91:0x4 DW_TAG_base_type
.byte 11 # DW_AT_name
.byte 6 # DW_AT_encoding
Expand Down
2 changes: 1 addition & 1 deletion bolt/test/X86/high_pc_udata.s
Expand Up @@ -124,7 +124,7 @@ main: # @main
.long .Linfo_string3 # DW_AT_name
.byte 1 # DW_AT_decl_file
.byte 1 # DW_AT_decl_line
.long 67 # DW_AT_type
.long 64 # DW_AT_type
# DW_AT_external
.byte 3 # Abbrev [3] 0x43:0x7 DW_TAG_base_type
.long .Linfo_string4 # DW_AT_name
Expand Down

0 comments on commit 1a1324a

Please sign in to comment.