This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Warn when we fail to find dwo/dwp files
ClosedPublic

Authored by labath on Mar 3 2022, 4:27 AM.

Details

Summary

This ensures that the user is aware that many commands will not work
correctly.

We print the warning only once (per module) to avoid spamming the user
with potentially thousands of error messages.

Diff Detail

Event Timeline

labath created this revision.Mar 3 2022, 4:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2022, 4:27 AM
labath requested review of this revision.Mar 3 2022, 4:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2022, 4:27 AM
JDevlieghere accepted this revision.Mar 3 2022, 8:55 AM

LGTM.

FWIW I'm planning some changes to the error reporting "soonish". The gist is using error/warning events which Xcode (or VSCode) can subscribe to. I'll send out an RFC with more details as I get closer to working on this.

This revision is now accepted and ready to land.Mar 3 2022, 8:55 AM
labath updated this revision to Diff 412774.Mar 3 2022, 10:55 AM

This code can be invoked concurrently (during indexing). Use atomic test-and-set
to ensure correctness.

Might a llvm::once_flag + llvm::call_once be simpler?

FWIW I'm planning some changes to the error reporting "soonish". The gist is using error/warning events which Xcode (or VSCode) can subscribe to. I'll send out an RFC with more details as I get closer to working on this.

Sounds like a good idea.

Might a llvm::once_flag + llvm::call_once be simpler?

Simpler... maybe.. depends how you look at it.

But, synchronization-wise, it is overkill. once_flag ensures that none of the racing threads can make progress until the action terminates. Most of the time, that's exactly what we want, but here the correct operation of the other threads is not affected by this action, so it is sufficient that the warning gets printed "eventually".

JDevlieghere accepted this revision.Mar 3 2022, 11:10 AM

Cool, thanks for the explanation. Ship it.

This revision was automatically updated to reflect the committed changes.