forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DWARF] Fix DWARFUnit::getDebugInfoSize() for 64-bit DWARF.
The calculation there was correct only for DWARF32. Differential Revision: https://reviews.llvm.org/D66421 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369356 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
1 parent
1074344
commit 8e766b3
Showing
3 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# RUN: llvm-mc %s -filetype obj -triple x86_64-unknown-elf -o - | \ | ||
# RUN: llvm-dwarfdump -debug-info - | \ | ||
# RUN: FileCheck %s | ||
|
||
.section .debug_abbrev,"",@progbits | ||
.byte 0x01 # Abbrev code | ||
.byte 0x11 # DW_TAG_compile_unit | ||
.byte 0x00 # DW_CHILDREN_no | ||
.byte 0x13 # DW_AT_language | ||
.byte 0x05 # DW_FORM_data2 | ||
.byte 0x00 # EOM(1) | ||
.byte 0x00 # EOM(2) | ||
.byte 0x00 # EOM(3) | ||
|
||
.section .debug_info,"",@progbits | ||
# CHECK: .debug_info contents: | ||
# CHECK-NEXT: 0x00000000: Compile Unit: | ||
DI_4_64_start: | ||
.long 0xffffffff # DWARF64 mark | ||
.quad DI_4_64_end - DI_4_64_version # Length of Unit | ||
# CHECK-SAME: length = 0x0000000f | ||
DI_4_64_version: | ||
.short 4 # DWARF version number | ||
# CHECK-SAME: version = 0x0004 | ||
.quad .debug_abbrev # Offset Into Abbrev. Section | ||
# CHECK-SAME: abbr_offset = 0x0000 | ||
.byte 8 # Address Size (in bytes) | ||
# CHECK-SAME: addr_size = 0x08 | ||
# CHECK-SAME: (next unit at 0x0000001b) | ||
|
||
.byte 1 # Abbreviation code | ||
# CHECK: 0x00000017: DW_TAG_compile_unit | ||
.short 4 # DW_LANG_C_plus_plus | ||
# CHECK-NEXT: DW_AT_language (DW_LANG_C_plus_plus) | ||
.byte 0 # NULL | ||
DI_4_64_end: | ||
|