libDebugInfoDWARF: Don't try to parse loclist[.dwo] headers when parsing debug_info[.dwo]
There's no way to know whether there's a loclist contribution to parse if there's no loclistx encoding - and if there is one, there's no need to walk back from the loclist_base (or, uin the case of info.dwo/loclist.dwo - starting at 0 in the contribution) to parse the header, instead rely on the DWARF32/64 and address size in the CU that's already available. This would come up in split DWARF (non-split wouldn't try to read a loclist header in the absence of a loclist_base) when one unit had location lists and another does not (because the loclists.dwo section would be non-empty in that case - in the case where it's empty the parsing would silently skip). Simplify the testing a bit, rather than needing a whole dwp, etc - by creating a malformed loclists.dwo section (and use single file Split DWARF) that would trip up any attempt to parse it - but no attempt should be made.
Loading
Please sign in to comment