This is an archive of the discontinued LLVM Phabricator instance.

Fix infinite recursion in DWO file parsing
ClosedPublic

Authored by labath on Mar 29 2016, 6:28 AM.

Details

Summary

Since r264316, clang started adding DW_AT_GNU_dwo_name attribute to dwo files (previously, this
attribute was only present in main object files), breaking pretty much every dwo test. The
problem was that we were treating the presence of said attribute as a signal that we should look
for information in an external object file, and caused us to enter an infinite loop. I fix this
by making sure we do not go looking for an external dwo file if we already *are* parsing a dwo
file.

Diff Detail

Event Timeline

labath updated this revision to Diff 51896.Mar 29 2016, 6:28 AM
labath retitled this revision from to Fix infinite recursion in DWO file parsing.
labath updated this object.
labath added reviewers: tberghammer, clayborg.
labath added a subscriber: lldb-commits.
tberghammer accepted this revision.Mar 29 2016, 6:36 AM
tberghammer edited edge metadata.

Looks good

source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
334

I would rename it to GetDwoSymbolFileForCompileUnit(....) as DWO in its own doesn't mean too much.

This revision is now accepted and ready to land.Mar 29 2016, 6:36 AM
labath marked an inline comment as done.Mar 29 2016, 6:46 AM

@clayborg: I am going to put this in now, to stabilize the buildbot situation. I'll be happy to address any concerns in a follow-up commit.

This revision was automatically updated to reflect the committed changes.