<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">> codecvt> : the patch uses a c++ 11 class std::codecvt_utf8, this is a facet implementation that will do utf8 to wchar convervsion. It is part of c++ 11 standard, but not yet supported in gcc. </span><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Should we drop support for building with gcc on Linux?</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">> </font><span style="font-family:arial,sans-serif;font-size:13px">- take libedit source files (or subset) and add to the lldb project. We could either build a .so file, or just statically link the .cpp files.</span></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Is it a problem to drop these "berkeley stype license" files into the project?</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">> </font><span style="font-family:arial,sans-serif;font-size:13px">- rework the Editline rewrite, so it either uses standard 8 bit chars, or wchar_t/utf8 depending on the platform. This would be conditionally built depending on the platform.</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">This would be my favorite option if possible. wchar_t never really took roots in Linux AFAIK.</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><font face="arial, sans-serif">> </font><span style="font-family:arial,sans-serif;font-size:13px">- introduce custom step for new linux lldb users, where they download libedit source and build and install a wchar version</span><br style="font-family:arial,sans-serif;font-size:13px"><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div></div><div>Not as good as options above but we can work with this.</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 28, 2014 at 12:42 PM, Shawn Best <span dir="ltr"><<a href="mailto:sbest@blueshiftinc.com" target="_blank">sbest@blueshiftinc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There is a significant Editline rewrite, adding a bunch of improvements. It has been well tested on OSx, but not yet upstreamed. I have spent some time reviewing the proposed patch and working through issues to get it running on linux. To see the patch and accompanying discussion, refer to: <a href="http://reviews.llvm.org/D5835" target="_blank">http://reviews.llvm.org/D5835</a> The main issues that came up are related to handling wide characters and differences between platforms.<br>
<br>
Internally, lldb uses std::string which is an array of 8 bit chars, that can either be 7 bit ascii, or utf8 encoded wide characters. Libedit uses either char, or wchar_t which is a 32 bit char on linux.<br>
<br>
<codecvt> : the patch uses a c++ 11 class std::codecvt_utf8, this is a facet implementation that will do utf8 to wchar convervsion. It is part of c++ 11 standard, but not yet supported in gcc. I can use #ifdef to temporarily write equivalent functionality in that case while we wait for gcc to catch up.<br>
<br>
libedit : libedit is a prerequisite that a new linux/lldb user installs ( sudo apt-get install libedit-dev ). A few years ago, libedit added versions of its functions that work on wchar_t. Unfortunately, this option is not built by default, and not present in the Ubuntu distribution. To get around this, I see a few options:<br>
<br>
- take libedit source files (or subset) and add to the lldb project. We could either build a .so file, or just statically link the .cpp files.<br>
<br>
- rework the Editline rewrite, so it either uses standard 8 bit chars, or wchar_t/utf8 depending on the platform. This would be conditionally built depending on the platform.<br>
<br>
- modify Ubuntu, so 'sudo apt-get install dev-libedit' installs a version that has been built with wide character support enabled.<br>
<br>
- introduce custom step for new linux lldb users, where they download libedit source and build and install a wchar version<br>
<br>
The last 2 options don't seem that great.<br>
<br>
I expect there will be problems on Windows, which I think uses utf16 coding. The file EditLineWin.cpp, contains prototypes for most of the structures and functions needed, but they look stubbed out.<br>
<br>
Any thoughts?<br>
<br>
Shawn.<br>
______________________________<u></u>_________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/lldb-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><br><table cellspacing="0" cellpadding="0" style="font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Vince Harron |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Technical Lead Manager |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:vharron@google.com" target="_blank">vharron@google.com</a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"> 858-442-0868</td></tr></tbody></table><br></div>
</div>