This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Port Process::PrintWarning* to use the new diagnostic events
ClosedPublic

Authored by JDevlieghere on Apr 13 2022, 11:06 AM.

Details

Summary

Port the two Process::PrintWarning functions to use the new diagnostic events through Debugger::ReportWarning. I kept the wrapper function in the process, but delegated the work to the Module. Consistent with the current code, the Module ensures the warning is only printed once per module.

Diff Detail

Event Timeline

JDevlieghere created this revision.Apr 13 2022, 11:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2022, 11:06 AM
JDevlieghere requested review of this revision.Apr 13 2022, 11:06 AM

Update tests to check stderr

kastiglione accepted this revision.Apr 14 2022, 10:04 AM
kastiglione added inline comments.
lldb/include/lldb/Core/Module.h
820–825

In this diff, it seems the debugger_id is always given. Is the Optionalality for future uses?

This revision is now accepted and ready to land.Apr 14 2022, 10:04 AM
JDevlieghere marked an inline comment as done.Apr 14 2022, 10:07 AM
JDevlieghere added inline comments.
lldb/include/lldb/Core/Module.h
820–825

Yeah, my thinking was that modules are rarely tied to a single debugger, but these particular function are only called from the process. I'll make them non-optional.

This revision was automatically updated to reflect the committed changes.
JDevlieghere marked an inline comment as done.
Herald added a project: Restricted Project. · View Herald TranscriptApr 14 2022, 11:00 AM