This is an archive of the discontinued LLVM Phabricator instance.

[LLDB] - Parse the DW_LLE_startx_length correctly for DWARF v5 case.
ClosedPublic

Authored by grimar on Oct 24 2018, 7:06 AM.

Details

Summary

Currently, we always parse the length field of DW_LLE_startx_length entry as U32.
That is correct for pre-standard definition:

https://gcc.gnu.org/wiki/DebugFission - "A start/length entry contains one unsigned LEB128 number
and a 4-byte unsigned value (as would be represented by the form code DW_FORM_const4u). The first
number is an index into the .debug_addr section that selects the beginning offset, and the second
number is the length of the range. ")

But DWARF v5 says: "This is a form of bounded location description that has two unsigned ULEB operands.
The first value is an address index (into the .debug_addr section) that indicates the beginning of the address
range over which the location is valid. The second value is the length of the range."

Fortunately, we can easily handle the difference. No test case because it seems impossible to test
until we will be ready to use DWARF v5 in tests that need to run the executables.

Diff Detail

Repository
rLLDB LLDB

Event Timeline

grimar created this revision.Oct 24 2018, 7:06 AM
clayborg accepted this revision.Oct 24 2018, 10:45 AM
This revision is now accepted and ready to land.Oct 24 2018, 10:45 AM
This revision was automatically updated to reflect the committed changes.