diff options
| author | Frederic Riss <friss@apple.com> | 2015-03-14 15:49:07 +0000 |
|---|---|---|
| committer | Frederic Riss <friss@apple.com> | 2015-03-14 15:49:07 +0000 |
| commit | dfb9790a3d9564819c9b529c19675300e20d461f (patch) | |
| tree | 71c753bbedbaa7ada698a013ae2c7a36062f0d8d /llvm/test/tools | |
| parent | 09db991e3797f56424ccd205083df79e4965b93a (diff) | |
| download | bcm5719-llvm-dfb9790a3d9564819c9b529c19675300e20d461f.tar.gz bcm5719-llvm-dfb9790a3d9564819c9b529c19675300e20d461f.zip | |
[dsymutil] Add support for debug_loc section.
There is no need to look into the location expressions to transfer them,
the only modification to apply is to patch their base address to reflect
the linked function address.
llvm-svn: 232267
Diffstat (limited to 'llvm/test/tools')
3 files changed, 36 insertions, 2 deletions
diff --git a/llvm/test/tools/dsymutil/X86/basic-linking-x86.test b/llvm/test/tools/dsymutil/X86/basic-linking-x86.test index 7958d83c7e2..66d4d7f3ce6 100644 --- a/llvm/test/tools/dsymutil/X86/basic-linking-x86.test +++ b/llvm/test/tools/dsymutil/X86/basic-linking-x86.test @@ -129,6 +129,9 @@ CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 ) CHECK: NULL +CHECK: .debug_loc contents +CHECK-NOT: Location + CHECK:.debug_aranges contents: CHECK-NEXT:Address Range Header: length = 0x0000002c, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x08, seg_size = 0x00 CHECK-NEXT:[0x0000000100000ea0 - 0x0000000100000ec4) diff --git a/llvm/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test b/llvm/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test index 40b578ad865..9c0d3b59bda 100644 --- a/llvm/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test +++ b/llvm/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test @@ -66,7 +66,8 @@ CHECK: DW_AT_frame_base [DW_FORM_exprloc] (<0x1> 56 ) CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000005c] = "foo") CHECK: DW_AT_prototyped [DW_FORM_flag_present] (true) CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x002a => {0x000000a1}) -CHECK: DW_TAG_formal_parameter [11] +CHECK: DW_TAG_formal_parameter [11] +CHECK: DW_AT_location [DW_FORM_sec_offset] (0x00000000) CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000060] = "arg") CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x002a => {0x000000a1}) CHECK: DW_TAG_inlined_subroutine [12] @@ -95,7 +96,8 @@ CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000f90) CHECK: DW_AT_high_pc [DW_FORM_data4] (0x00000024) CHECK: DW_AT_frame_base [DW_FORM_exprloc] (<0x1> 56 ) CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000071] = "bar") -CHECK: DW_TAG_formal_parameter [16] +CHECK: DW_TAG_formal_parameter [16] +CHECK: DW_AT_location [DW_FORM_sec_offset] (0x00000025) CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000060] = "arg") CHECK: DW_TAG_inlined_subroutine [17] CHECK: DW_AT_abstract_origin [DW_FORM_ref4] (cu + 0x0044 => {0x0000015f} "inc") @@ -106,6 +108,20 @@ CHECK: [0x0000000100000f9f - 0x0000000100000fa7)) CHECK: NULL CHECK: NULL + +CHECK: .debug_loc contents: +CHECK-NEXT: 0x00000000: Beginning address offset: 0x0000000000000000 +CHECK-NEXT: Ending address offset: 0x000000000000000c +CHECK-NEXT: Location description: 55 93 04 +CHECK-NEXT: {{^$}} +CHECK-NEXT: 0x00000025: Beginning address offset: 0x0000000000000000 +CHECK-NEXT: Ending address offset: 0x000000000000000f +CHECK-NEXT: Location description: 55 93 04 +CHECK-NEXT: {{^$}} +CHECK-NEXT: Beginning address offset: 0x0000000000000019 +CHECK-NEXT: Ending address offset: 0x000000000000001d +CHECK-NEXT: Location description: 55 93 04 + CHECK: .debug_aranges contents: CHECK-NEXT: Address Range Header: length = 0x0000002c, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x08, seg_size = 0x00 CHECK-NEXT: [0x0000000100000f40 - 0x0000000100000f4b) diff --git a/llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test b/llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test index 8db5bc54c66..b1c630f6b54 100644 --- a/llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test +++ b/llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test @@ -71,6 +71,7 @@ CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 ) CHECK: DW_TAG_formal_parameter [9] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000086] = "arg") CHECK: DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063) +CHECK: DW_AT_location [DW_FORM_data4] (0x00000000) CHECK: DW_TAG_inlined_subroutine [10] CHECK: DW_AT_abstract_origin [DW_FORM_ref4] (cu + 0x00a7 => {0x00000128} "inc") CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000f63) @@ -105,6 +106,7 @@ CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 ) CHECK: DW_TAG_formal_parameter [9] CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000086] = "arg") CHECK: DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063) +CHECK: DW_AT_location [DW_FORM_data4] (0x00000025) CHECK: DW_TAG_lexical_block [14] * CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000100000f94) CHECK DW_AT_high_pc [DW_FORM_addr] (0x0000000100000fa7) @@ -120,6 +122,19 @@ CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000008a] = "inc") CHECK: DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063) CHECK: NULL +CHECK:.debug_loc contents: +CHECK-NEXT: 0x00000000: Beginning address offset: 0x0000000000000000 +CHECK-NEXT: Ending address offset: 0x000000000000000e +CHECK-NEXT: Location description: 55 93 04 +CHECK-NEXT: {{^$}} +CHECK-NEXT: 0x00000025: Beginning address offset: 0x0000000000000000 +CHECK-NEXT: Ending address offset: 0x000000000000000f +CHECK-NEXT: Location description: 55 93 04 +CHECK-NEXT: {{^$}} +CHECK-NEXT: Beginning address offset: 0x0000000000000019 +CHECK-NEXT: Ending address offset: 0x000000000000001d +CHECK-NEXT: Location description: 55 93 04 + CHECK: .debug_aranges contents: CHECK-NEXT: Address Range Header: length = 0x0000002c, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x08, seg_size = 0x00 CHECK-NEXT: [0x0000000100000f40 - 0x0000000100000f4b) |

