21
21
# SHDR-NEXT: AddressAlignment: [[ADDRALIGN]]
22
22
# SHDR-NEXT: EntrySize: 0
23
23
# DWARF32-LE-CONTENT-NEXT: SectionData (
24
- # DWARF32-LE-CONTENT-NEXT: 0000: 34120000 05000204 34120000 01785634
24
+ # DWARF32-LE-CONTENT-NEXT: 0000: 34120000 05000304 34120000 01785634
25
25
# # ^------- unit_length (4-byte)
26
26
# # ^--- version (2-byte)
27
27
# # ^- unit_type (1-byte) DW_UT_type
@@ -208,7 +208,7 @@ DWARF:
208
208
debug_info :
209
209
- Length : 0x1234
210
210
Version : 5
211
- UnitType : DW_UT_type
211
+ UnitType : DW_UT_partial
212
212
AbbrOffset : 0x1234
213
213
AddrSize : 4
214
214
Entries :
@@ -297,7 +297,7 @@ DWARF:
297
297
# RUN: FileCheck -DINDEX=2 -DNAME=15 -DOFFSET=0x9B -DSIZE=179 -DADDRALIGN=1 %s --check-prefixes=SHDR,DWARF32-BE-CONTENT
298
298
299
299
# DWARF32-BE-CONTENT-NEXT: SectionData (
300
- # DWARF32-BE-CONTENT-NEXT: 0000: 00001234 00050204 00001234 01123456
300
+ # DWARF32-BE-CONTENT-NEXT: 0000: 00001234 00050304 00001234 01123456
301
301
# # ^------- unit_length (4-byte)
302
302
# # ^--- version (2-byte)
303
303
# # ^- unit_type (1-byte) DW_UT_type
@@ -449,7 +449,7 @@ DWARF:
449
449
debug_info :
450
450
- Length : 0x1234
451
451
Version : 5
452
- UnitType : DW_UT_type
452
+ UnitType : DW_UT_compile
453
453
AbbrOffset : 0x1234
454
454
Entries : []
455
455
@@ -476,7 +476,7 @@ DWARF:
476
476
debug_info :
477
477
- Length : 0x1234
478
478
Version : 5
479
- UnitType : DW_UT_type
479
+ UnitType : DW_UT_compile
480
480
AbbrOffset : 0x1234
481
481
Entries : []
482
482
@@ -541,7 +541,7 @@ DWARF:
541
541
debug_info :
542
542
- Length : 0x1234
543
543
Version : 5
544
- UnitType : DW_UT_type
544
+ UnitType : DW_UT_compile
545
545
AbbrOffset : 0x1234
546
546
Entries :
547
547
- AbbrCode : 0
@@ -554,7 +554,7 @@ DWARF:
554
554
# RUN: FileCheck %s --check-prefix=EMPTY-ENTRIES --match-full-lines
555
555
556
556
# EMPTY-ENTRIES: Hex dump of section '.debug_info':
557
- # EMPTY-ENTRIES-NEXT: 0x00000000 34120000 05000204 34120000 4.......4...
557
+ # EMPTY-ENTRIES-NEXT: 0x00000000 34120000 05000104 34120000 4.......4...
558
558
# EMPTY-ENTRIES-EMPTY:
559
559
# # ^- 'Entries' is empty
560
560
@@ -567,7 +567,7 @@ DWARF:
567
567
debug_info :
568
568
- Length : 0x1234
569
569
Version : 5
570
- UnitType : DW_UT_type
570
+ UnitType : DW_UT_compile
571
571
AbbrOffset : 0x1234
572
572
Entries : []
573
573
@@ -579,7 +579,7 @@ DWARF:
579
579
# RUN: FileCheck %s --check-prefix=FORM --match-full-lines
580
580
581
581
# FORM: Hex dump of section '.debug_info':
582
- # FORM-NEXT: 0x00000000 34120000 05000204 34120000 02341221 4.......4....4.!
582
+ # FORM-NEXT: 0x00000000 34120000 05000104 34120000 02341221 4.......4....4.!
583
583
# # ^------- unit_length (4-byte)
584
584
# # ^- abbreviation code (ULEB128)
585
585
# # ^--- Form: DW_FORM_data2 (2-byte)
@@ -617,7 +617,7 @@ DWARF:
617
617
debug_info :
618
618
- Length : 0x1234
619
619
Version : 5
620
- UnitType : DW_UT_type
620
+ UnitType : DW_UT_compile
621
621
AbbrOffset : 0x1234
622
622
Entries :
623
623
# # Test that yaml2obj emits values when the abbrev code is specified.
@@ -655,29 +655,58 @@ DWARF:
655
655
debug_info :
656
656
- Length : 0x1234
657
657
Version : 5
658
- UnitType : DW_UT_type
658
+ UnitType : DW_UT_compile
659
659
AbbrOffset : 0x1234
660
660
Entries :
661
661
- AbbrCode : 1
662
662
Values :
663
663
- Value : 0x1234
664
664
665
- # # j) Test that yaml2obj emits the correct DWARF64 unit headers.
666
-
667
- # # DWARFv5 unit header.
665
+ # # j) Test that yaml2obj emits the correct DWARFv5 unit headers.
668
666
669
667
# RUN: yaml2obj --docnum=11 %s -o %t11.o
670
668
# RUN: llvm-readelf --hex-dump=.debug_info %t11.o | \
671
669
# RUN: FileCheck %s --check-prefix=DWARFV5-HEADER
672
670
673
671
# DWARFV5-HEADER: Hex dump of section '.debug_info':
674
- # DWARFV5-HEADER-NEXT: 0x00000000 ffffffff 0c000000 00000000 05000208 ................
672
+ # DWARFV5-HEADER-NEXT: 0x00000000 ffffffff 0d000000 00000000 05000108 ................
675
673
# # ^------------------------- unit_length (12-byte)
676
674
# # ^--- version (2-byte)
677
675
# # ^- unit_type (1-byte)
678
676
# # ^- address_size (1-byte)
679
- # DWARFV5-HEADER-NEXT: 0x00000010 34120000 00000000 4 .......
677
+ # DWARFV5-HEADER-NEXT: 0x00000010 34120000 00000000 00150000 00050002 4........ .......
680
678
# # ^---------------- debug_abbrev_offset (8-byte)
679
+ # # ^- End of children (1-byte)
680
+ # # ^-------- unit_length (4-byte)
681
+ # # ^--- version (2-byte)
682
+ # # ^- unit_type (1-byte)
683
+ # DWARFV5-HEADER-NEXT: 0x00000020 08341200 000df0ad baefbead de180000 .4..............
684
+ # # ^- address_size (1-byte)
685
+ # # ^-------- debug_abbrev_offset (4-byte)
686
+ # # ^----------------- type_signature (8-byte)
687
+ # # \/ ^----- type_offset (4-byte)
688
+ # DWARFV5-HEADER-NEXT: 0x00000030 0000ffff ffff1d00 00000000 00000500 ................
689
+ # # ^- End of children (1-byte)
690
+ # # ^-------------------------- unit_length (12-byte)
691
+ # # ^--- version (2-byte)
692
+ # DWARFV5-HEADER-NEXT: 0x00000040 02083412 00000000 00000df0 adbaefbe ..4.............
693
+ # # ^- unit_type (1-byte)
694
+ # # ^- address_size (1-byte)
695
+ # # ^----------------- debug_abbrev_offset (8-byte)
696
+ # # \/-- ^------------ type_signature (8-byte)
697
+ # DWARFV5-HEADER-NEXT: 0x00000050 adde2800 00000000 00000011 00000005 ..(.............
698
+ # # ^----------------- type_offset (8-byte)
699
+ # # ^- End of children (1-byte)
700
+ # # ^-------- unit_length (4-byte)
701
+ # # \/ ^- version (2-byte)
702
+ # DWARFV5-HEADER-NEXT: 0x00000060 00040834 1200000d f0adbaef beadde00 ...4............
703
+ # # ^- unit_type (1-byte)
704
+ # # ^- address_size (1-byte)
705
+ # # ^-------- debug_abbrev_offset (4-byte)
706
+ # # ^----------------- type_signature (8-byte)
707
+ # # ^- End of children (1-byte)
708
+
709
+
681
710
682
711
--- !ELF
683
712
FileHeader :
@@ -686,12 +715,33 @@ FileHeader:
686
715
Type : ET_EXEC
687
716
DWARF :
688
717
debug_info :
718
+ - Format : DWARF64
719
+ Version : 5
720
+ UnitType : DW_UT_compile
721
+ AbbrOffset : 0x1234
722
+ Entries :
723
+ - AbbrCode : 0
724
+ - Version : 5
725
+ UnitType : DW_UT_type
726
+ AbbrOffset : 0x1234
727
+ TypeSignature : 0xdeadbeefbaadf00d
728
+ TypeOffset : 24
729
+ Entries :
730
+ - AbbrCode : 0
689
731
- Format : DWARF64
690
- Length : 0x0c
691
- Version : 5
692
- UnitType : DW_UT_type
693
- AbbrOffset : 0x1234
694
- Entries : []
732
+ Version : 5
733
+ UnitType : DW_UT_type
734
+ AbbrOffset : 0x1234
735
+ TypeSignature : 0xdeadbeefbaadf00d
736
+ TypeOffset : 40
737
+ Entries :
738
+ - AbbrCode : 0
739
+ - Version : 5
740
+ UnitType : DW_UT_skeleton
741
+ AbbrOffset : 0x1234
742
+ DwoID : 0xdeadbeefbaadf00d
743
+ Entries :
744
+ - AbbrCode : 0
695
745
696
746
# # DWARFv4 unit header.
697
747
0 commit comments