This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Print an error for unsupported combinations of log options
ClosedPublic

Authored by JDevlieghere on Feb 8 2023, 7:29 PM.

Details

Summary

Print an error for unsupported combinations of log handlers and log options. Only the stream log handler takes a file and only the circular and stream handler take a buffer size. This cannot be dealt with through option groups because the option combinations depend on the requested handler.

Diff Detail

Event Timeline

JDevlieghere created this revision.Feb 8 2023, 7:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 8 2023, 7:29 PM
JDevlieghere requested review of this revision.Feb 8 2023, 7:29 PM
bulbazord requested changes to this revision.Feb 8 2023, 7:54 PM
bulbazord added inline comments.
lldb/source/Commands/CommandObjectLog.cpp
180–184
lldb/test/Shell/Log/TestHandlers.test
6
This revision now requires changes to proceed.Feb 8 2023, 7:54 PM
JDevlieghere marked 2 inline comments as done.

Update error message

This revision is now accepted and ready to land.Feb 8 2023, 8:04 PM
clayborg added inline comments.Feb 8 2023, 10:07 PM
lldb/test/Shell/Log/TestHandlers.test
2–3

Can we use the long option names for readability here?

JDevlieghere marked an inline comment as done.Feb 9 2023, 9:04 AM
JDevlieghere added inline comments.
lldb/test/Shell/Log/TestHandlers.test
2–3

Absolutely

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 TranscriptFeb 9 2023, 9:58 AM