This is an archive of the discontinued LLVM Phabricator instance.

Add an explicit API to read the Xcode SDK DWARF attribute from compile units
ClosedPublic

Authored by aprantl on May 1 2020, 3:56 PM.

Details

Summary

When debugging from a SymbolMap the creation of CompileUnits for the
individual object files is so lazy that RegisterXcodeSDK() is not invoked at all
before the Swift TypeSystem wants to read it. This patch fixes this by
introducing an explicit SymbolFile::ParseXcodeSDK() call that can be
invoked deterministically before the result is required.

rdar://problem/62532151

Diff Detail

Event Timeline

aprantl created this revision.May 1 2020, 3:56 PM
aprantl updated this revision to Diff 261573.May 1 2020, 4:17 PM

Delete more code that is made obsolete by the new API.

aprantl updated this revision to Diff 261603.May 1 2020, 6:53 PM
friss accepted this revision.May 5 2020, 9:39 AM

This looks good to me. If a similar API made sense on Module, I guess it can live on SymboleFile.

This revision is now accepted and ready to land.May 5 2020, 9:39 AM
teemperor added inline comments.
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
786

I think we can early-exit here?

aprantl updated this revision to Diff 262176.May 5 2020, 11:08 AM
This comment was removed by aprantl.
aprantl updated this revision to Diff 262178.EditedMay 5 2020, 11:10 AM

Updated the wrong review...