This is an archive of the discontinued LLVM Phabricator instance.

Consolidate file handle usage in Editline.cpp

Authored by labath on Jan 5 2017, 7:46 AM.



To implement wide character reading, editline was mixing FILE*-based access with
a Connection-based one (plus it did some selects on the raw FD), which is very
fragile. Here, I replace it with one which uses only a Connection-based reads.
The code is somewhat longer as I had to read characters one by one to detect the
end of the multibyte sequence.

I've verified that international characters still work in lldb command line on

Diff Detail


Event Timeline

labath updated this revision to Diff 83237.Jan 5 2017, 7:46 AM
labath retitled this revision from to Consolidate file handle usage in Editline.cpp.
labath updated this object.
labath added reviewers: clayborg, zturner.
labath added a subscriber: lldb-commits.
clayborg accepted this revision.Jan 5 2017, 8:21 AM
clayborg edited edge metadata.
This revision is now accepted and ready to land.Jan 5 2017, 8:21 AM
This revision was automatically updated to reflect the committed changes.