This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Use the IOHandler's output/error stream instead of the debugger one in PrintAsync
ClosedPublic

Authored by JDevlieghere on Mar 12 2022, 5:13 PM.

Details

Summary

I was looking into PrintAsync because Pavel brought it up in D121500. The whole point seems to be to let the IOHandler deal with printing the output. In that context it didn't make much sense (to me) that this is using the debugger's output and error stream rather than the one from the IOHandler.

Diff Detail

Event Timeline

JDevlieghere created this revision.Mar 12 2022, 5:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 12 2022, 5:13 PM
JDevlieghere requested review of this revision.Mar 12 2022, 5:13 PM
labath accepted this revision.Mar 14 2022, 2:01 AM

In that context it didn't make much sense (to me) that this is using the debugger's output and error stream rather than the one from the IOHandler.

I don't know why this is set up the way it is, but I would be inclined to agree with you.

This revision is now accepted and ready to land.Mar 14 2022, 2:01 AM

(I suspect this has something to do with the ability to override the output of a particular iohandler in the stack. The idea may have been that the iohandler prints whereever it prints, but the asynchronous output always goes to the main output. But I don't know if we make use of this functionality anywhere.)

Herald added a project: Restricted Project. · View Herald TranscriptMar 14 2022, 10:12 AM