This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Emit diagnostic events in the diagnostic dump
ClosedPublic

Authored by JDevlieghere on Oct 24 2022, 4:25 PM.

Details

Summary

Emit diagnostic events (errors and warnings) in the diagnostic dump. This patch also adds an "information" diagnostic event, which doesn't get broadcast, but ends up in the diagnostics as well.

Diff Detail

Event Timeline

JDevlieghere created this revision.Oct 24 2022, 4:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 24 2022, 4:25 PM
JDevlieghere requested review of this revision.Oct 24 2022, 4:25 PM
labath accepted this revision.Oct 25 2022, 2:16 AM

(Unsurprisingly, I guess), this looks much better to me. And I'm totally open to automatically logging these diagnostics somewhere as well (to a dedicated log channel/category, or by passing the log as an argument, or something else).

lldb/source/Utility/Diagnostics.cpp
94

Maybe call this DumpDiangosticsLog ?

This revision is now accepted and ready to land.Oct 25 2022, 2:16 AM
clayborg added inline comments.Oct 25 2022, 4:30 PM
lldb/include/lldb/Core/Debugger.h
431

This comment seems wrong? The code below asserts and returns in PrivateReportDiagnostic(). Do we want to add a eBroadcastBitInfo?

This revision was landed with ongoing or failed builds.Oct 31 2022, 2:40 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 31 2022, 2:40 PM