123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- # Test that we report pcpair ranges from DIEs that have:
- # 0x00000010: DW_TAG_subprogram
- # DW_AT_low_pc (0x0000000000001000)
- # DW_AT_high_pc (0x0000000000001010)
- #
- # This is the most common way of getting data for the compileunits
- # data source.
- # RUN: %yaml2obj %s --docnum=1 -o %t.obj
- # RUN: %yaml2obj %s --docnum=2 -o %t.dwo
- # RUN: %bloaty %t.obj --debug-file %t.dwo -d compileunits --raw-map --domain=vm | %FileCheck %s
- --- !ELF
- FileHeader:
- Class: ELFCLASS64
- Data: ELFDATA2LSB
- Type: ET_DYN
- Machine: EM_X86_64
- Entry: 0x1040
- ProgramHeaders:
- - Type: PT_LOAD
- Flags: [ PF_X, PF_R ]
- FirstSec: .text
- LastSec: .text
- VAddr: 0x1000
- Align: 0x1000
- Sections:
- - Name: .note.gnu.build-id
- Type: SHT_NOTE
- Notes:
- - Name: GNU
- Desc: 6CF422D909772A0FB5400518A689D9F15F14BF57
- Type: 0x3 # NT_GNU_BUILD_ID
- - Name: .text
- Type: SHT_PROGBITS
- Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
- Address: 0x1000
- AddressAlign: 0x10
- Size: 0x20
- ...
- --- !ELF
- FileHeader:
- Class: ELFCLASS64
- Data: ELFDATA2LSB
- Type: ET_DYN
- Machine: EM_X86_64
- Entry: 0x1040
- Sections:
- - Name: .note.gnu.build-id
- Type: SHT_NOTE
- Notes:
- - Name: GNU
- Desc: 6CF422D909772A0FB5400518A689D9F15F14BF57
- Type: 0x3 # NT_GNU_BUILD_ID
- DWARF:
- debug_str:
- - foo.c
- - bar.c
- debug_abbrev:
- - ID: 0
- Table:
- - Code: 0x1
- Tag: DW_TAG_compile_unit
- Children: DW_CHILDREN_yes
- Attributes:
- - Attribute: DW_AT_name
- Form: DW_FORM_strp
- - Code: 0x2
- Tag: DW_TAG_subprogram
- Children: DW_CHILDREN_no
- Attributes:
- - Attribute: DW_AT_low_pc
- Form: DW_FORM_addr
- - Attribute: DW_AT_high_pc
- Form: DW_FORM_data4 # high_pc as size
- - Code: 0x3
- Tag: DW_TAG_subprogram
- Children: DW_CHILDREN_no
- Attributes:
- - Attribute: DW_AT_low_pc
- Form: DW_FORM_addr
- - Attribute: DW_AT_high_pc
- Form: DW_FORM_addr # high_pc as addr
- debug_info:
- # 0x0000000b: DW_TAG_compile_unit
- # DW_AT_name [DW_FORM_strp] ("foo.c")
- #
- # 0x00000010: DW_TAG_subprogram
- # DW_AT_low_pc [DW_FORM_addr] (0x0000000000001010)
- # DW_AT_high_pc [DW_FORM_data4] (0x00000010)
- - Version: 4
- AbbrevTableID: 0
- AbbrOffset: 0x0
- AddrSize: 8
- Entries:
- - AbbrCode: 0x1
- Values:
- - Value: 0x0
- - AbbrCode: 0x2
- Values:
- - Value: 0x1010
- - Value: 0x10
- - AbbrCode: 0x0
- # 0x00000029: DW_TAG_compile_unit
- # DW_AT_name [DW_FORM_strp] ("bar.c")
- #
- # 0x0000002e: DW_TAG_subprogram
- # DW_AT_low_pc [DW_FORM_addr] (0x0000000000001000)
- # DW_AT_high_pc [DW_FORM_addr] (0x0000000000001010)
- - Version: 4
- AbbrevTableID: 0
- AbbrOffset: 0x0
- AddrSize: 8
- Entries:
- - AbbrCode: 0x1
- Values:
- - Value: 0x6
- - AbbrCode: 0x3
- Values:
- - Value: 0x1000
- - Value: 0x1010
- - AbbrCode: 0x0
- ...
- # CHECK: VM MAP:
- # CHECK: 0000-1000 4096 [-- Nothing mapped --]
- # CHECK: 1000-1010 16 bar.c
- # CHECK: 1010-1020 16 foo.c
|