This is an archive of the discontinued LLVM Phabricator instance.

DWARF] DWARF v5: .debug_rnglists: adding support for DW_RLE_offset_pair and DW_RLE_base_address
ClosedPublic

Authored by wolfgangp on Mar 22 2018, 4:29 PM.

Details

Summary

Barring the usage of the .debug_addr section (DW_RLE_startx_endx etc), these 2 encodings were the only ones not supported yet., DW_RLE_offset_pair the only encoding usable in dwo files.

Note that in non-verbose printing, we don't print anything for DW_RLE_base_address. In verbose mode the entry is printed explicitly.

Diff Detail

Event Timeline

wolfgangp created this revision.Mar 22 2018, 4:29 PM
aprantl added inline comments.Mar 22 2018, 4:37 PM
lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp
232

Just to be safe: Is this an internal consistency check or should this be an error handler instead?

dblaikie added inline comments.Mar 22 2018, 4:39 PM
lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp
134

Some of our range dumping can now print which section an address refers to - should we do that for this range dumping? If so, we'd need to extract the section info here, I think?

224–233

Rather than grouping these under the same switch, then using a conditional - might it be worth having separate cases? The common verbose part could be factored into a local lambda, maybe?

wolfgangp added inline comments.Mar 23 2018, 10:20 AM
lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp
232

It's a consistency check. I was debating whether the assert was necessary at all since we're in fairly tightly controlled context, but after Dave's suggestion it's a moot point.

wolfgangp added inline comments.Mar 23 2018, 10:47 AM
lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp
134

Currently the section is displayed when we're dumping the specific ranges a DIE refers to (DW_AT_ranges attribute). When we're dumping the contents of the entire .debug_ranges section we don't do it. Do you think we should do it there too?

The full support for .debug_rnglists will turn the rangelists into DWARFAddressRangesVectors, so it will behave the same as the current implementation in this respect.

wolfgangp updated this revision to Diff 139683.Mar 23 2018, 5:21 PM
wolfgangp marked an inline comment as done.

Addressed review comment on separating DW_RLW_offset_pair and DW_RLE_start_length when dumping their contents.

dblaikie accepted this revision.Mar 27 2018, 10:14 AM

Seems good to me

This revision is now accepted and ready to land.Mar 27 2018, 10:14 AM
This revision was automatically updated to reflect the committed changes.