This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Don't print to stderr in TypeSystemClang::GetBuiltinTypeForDWARFEncodingAndBitSize
ClosedPublic

Authored by teemperor on Oct 5 2021, 6:44 AM.

Details

Summary

The current code just prints to the System's 'error log' which is usually stderr (+ some other log backend).
Printing to stderr however just interferes with LLDB's console UI, so when this code is triggered during
for example command completion it just breaks the LLDB console interface until the next redraw.

Instead just use the normal LLDB log which is by default hidden and is what users usually attach to
bug reports.

The only known bug that triggers this is https://bugs.llvm.org/show_bug.cgi?id=46775

Diff Detail

Event Timeline

teemperor created this revision.Oct 5 2021, 6:44 AM
teemperor requested review of this revision.Oct 5 2021, 6:44 AM
teemperor planned changes to this revision.Oct 5 2021, 6:50 AM

Still need to write a test.

teemperor updated this revision to Diff 377226.Oct 5 2021, 7:05 AM
  • Add some tests
teemperor updated this revision to Diff 377456.Oct 6 2021, 1:01 AM
  • Remove duplicated newline.
teemperor edited the summary of this revision. (Show Details)Oct 6 2021, 1:01 AM
labath accepted this revision.Oct 6 2021, 3:47 AM

I'm not sure how useful is that test case, but yeah....

This revision is now accepted and ready to land.Oct 6 2021, 3:47 AM
This revision was automatically updated to reflect the committed changes.