<div dir="ltr">Submitted:<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><span style="font-family:'courier new',monospace;font-size:x-small">tfiala@tfiala2:~/lldb/svn/iohandler/llvm/tools/lldb$ svn commit</span><br>
</div></div><div><div><span style="font-family:'courier new',monospace;font-size:x-small">Sending source/Commands/CommandObjectCommands.cpp</span><br></div></div><div><div><font face="courier new, monospace" size="1">Sending test/functionalities/command_regex/TestCommandRegex.py</font></div>
</div><div><div><font face="courier new, monospace" size="1">Transmitting file data ..</font></div></div><div><div><font face="courier new, monospace" size="1">Committed revision 198964.</font></div></div></blockquote><div>
<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 10, 2014 at 2:37 PM, Greg Clayton <span dir="ltr"><<a href="mailto:gclayton@apple.com" target="_blank">gclayton@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The patches look fine, please commit when possible!<br>
<span class="HOEnZb"><font color="#888888"><br>
Greg<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Jan 10, 2014, at 12:55 PM, Todd Fiala <<a href="mailto:tfiala@google.com">tfiala@google.com</a>> wrote:<br>
<br>
> Our final 3 test issues were covered by failure to set the CC and CXX to our gcc/g++ during the test run.<br>
><br>
> We're now all clear assuming we check in the patch above.<br>
><br>
> Any comments on the fix above?<br>
><br>
> -Todd<br>
><br>
><br>
> On Fri, Jan 10, 2014 at 12:35 PM, Todd Fiala <<a href="mailto:tfiala@google.com">tfiala@google.com</a>> wrote:<br>
> We have a fix in the iohandler branch for a test failure of TestCommandRegex.py. When using libedit, the multi-line handler is stripping one too many lines from the collected input. This is causing 'command regex' and its related test to fail. The test was also expecting different output than the command currently emits.<br>
><br>
> Here is a patch for the proposed fix:<br>
><br>
> Index: test/functionalities/command_regex/TestCommandRegex.py<br>
> ===================================================================<br>
> --- test/functionalities/command_regex/TestCommandRegex.py (revision 198951)<br>
> +++ test/functionalities/command_regex/TestCommandRegex.py (working copy)<br>
> @@ -13,9 +13,9 @@<br>
> mydir = TestBase.compute_mydir(__file__)<br>
><br>
> def test_command_regex(self):<br>
> - """Test a simple scenario of 'command regexp' invocation and subsequent use."""<br>
> + """Test a simple scenario of 'command regex' invocation and subsequent use."""<br>
> prompt = "(lldb) "<br>
> - regex_prompt = "Enter regular expressions in the form 's/<regex>/<subst>/' and terminate with an empty line:\r\n"<br>
> + regex_prompt = "Enter one of more sed substitution commands in the form: 's/<regex>/<subst>/'.\r\nTerminate the substitution list with an empty line.\r\n"<br>
> regex_prompt1 = "\r\n"<br>
><br>
> child = pexpect.spawn('%s %s' % (self.lldbHere, self.lldbOption))<br>
> Index: source/Commands/CommandObjectCommands.cpp<br>
> ===================================================================<br>
> --- source/Commands/CommandObjectCommands.cpp (revision 198951)<br>
> +++ source/Commands/CommandObjectCommands.cpp (working copy)<br>
> @@ -956,10 +956,9 @@<br>
> {<br>
> if (line_idx == UINT32_MAX)<br>
> {<br>
> - // Remove the last "DONE" line from "lines" so it doesn't appear<br>
> - // in our final commands and return true to indicate we are done<br>
> - // getting lines<br>
> - lines.PopBack();<br>
> + // Return true to indicate we are done getting lines (this<br>
> + // is a "fake" line - the real terminating blank line was<br>
> + // removed during a previous call with the code below)<br>
> error.Clear();<br>
> return LineStatus::Done;<br>
> }<br>
><br>
> Any feedback on that fix?<br>
><br>
> After this, we are down to the following failures on the iohandler branch, Ubuntu 12.04, gcc 4.8.2, with latest configure-enabled libedit built from source:<br>
><br>
> Ran 272 tests.<br>
> Failing Tests (3)<br>
> FAIL: LLDB (suite) :: TestDataFormatterCategories.py (Linux <a href="http://tfiala2.mtv.corp.google.com" target="_blank">tfiala2.mtv.corp.google.com</a> 3.2.5-gg1336 #1 SMP Thu Aug 29 02:37:18 PDT 2013 x86_64 x86_64)<br>
> FAIL: LLDB (suite) :: TestDataFormatterGlobals.py (Linux <a href="http://tfiala2.mtv.corp.google.com" target="_blank">tfiala2.mtv.corp.google.com</a> 3.2.5-gg1336 #1 SMP Thu Aug 29 02:37:18 PDT 2013 x86_64 x86_64)<br>
> FAIL: LLDB (suite) :: TestConvenienceVariables.py (Linux <a href="http://tfiala2.mtv.corp.google.com" target="_blank">tfiala2.mtv.corp.google.com</a> 3.2.5-gg1336 #1 SMP Thu Aug 29 02:37:18 PDT 2013 x86_64 x86_64)<br>
> make: *** [check-local] Error 1<br>
><br>
> We're working on these now.<br>
><br>
><br>
> On Fri, Jan 10, 2014 at 10:47 AM, Steve Pucci <<a href="mailto:spucci@google.com">spucci@google.com</a>> wrote:<br>
> > Note even with this, we are still having a libedit issue on multiline input handling (as exposed through the regex command test). We're looking at this now.<br>
><br>
> I believe I know what this is. More when I've confirmed...<br>
><br>
> - Steve<br>
><br>
><br>
><br>
> On Fri, Jan 10, 2014 at 10:44 AM, Greg Clayton <<a href="mailto:gclayton@apple.com">gclayton@apple.com</a>> wrote:<br>
> Looks good!<br>
><br>
> On Jan 10, 2014, at 10:40 AM, Todd Fiala <<a href="mailto:tfiala@google.com">tfiala@google.com</a>> wrote:<br>
><br>
> > There was a slight tweak to the change above to deal with modifications that just came in on IOHandler's TreeItem.<br>
> ><br>
> > Here is the change submission:<br>
> ><br>
> > Sending lib/Makefile<br>
> > Sending source/Core/IOHandler.cpp<br>
> > Transmitting file data ..<br>
> ><br>
> > Committed revision 198951.<br>
> ><br>
> > Final patch attached.<br>
> ><br>
> ><br>
> ><br>
> > On Fri, Jan 10, 2014 at 10:21 AM, Todd Fiala <<a href="mailto:tfiala@google.com">tfiala@google.com</a>> wrote:<br>
> > Here is the final patch we need to get lldb compiling on the iochannel branch on Ubuntu 12.04 x86_64 using configure and makefiles:<br>
> ><br>
> > Index: source/Core/IOHandler.cpp<br>
> > ===================================================================<br>
> > --- source/Core/IOHandler.cpp (revision 198946)<br>
> > +++ source/Core/IOHandler.cpp (working copy)<br>
> > @@ -2251,7 +2251,24 @@<br>
> > m_did_calculate_children (false)<br>
> > {<br>
> > }<br>
> > -<br>
> > +<br>
> > + TreeItem &<br>
> > + operator=(const TreeItem &rhs)<br>
> > + {<br>
> > + if (this != &rhs)<br>
> > + {<br>
> > + m_parent = rhs.m_parent;<br>
> > + m_delegate = rhs.m_delegate;<br>
> > + m_user_data = rhs.m_user_data;<br>
> > + m_row_idx = rhs.m_row_idx;<br>
> > + m_children = rhs.m_children;<br>
> > + m_might_have_children = rhs.m_might_have_children;<br>
> > + m_is_expanded = rhs.m_is_expanded;<br>
> > + m_did_calculate_children = rhs.m_did_calculate_children;<br>
> > + }<br>
> > + return *this;<br>
> > + }<br>
> > +<br>
> > size_t<br>
> > GetDepth () const<br>
> > {<br>
> > Index: lib/Makefile<br>
> > ===================================================================<br>
> > --- lib/Makefile (revision 198946)<br>
> > +++ lib/Makefile (working copy)<br>
> > @@ -148,7 +148,7 @@<br>
> > # Don't allow unresolved symbols.<br>
> > LLVMLibsOptions += -Wl,--no-undefined<br>
> > # Link in python<br>
> > - LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt<br>
> > + LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -ledit -lncurses<br>
> > LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT)<br>
> > endif<br>
> ><br>
> > Note even with this, we are still having a libedit issue on multiline input handling (as exposed through the regex command test). We're looking at this now. I'll go ahead and put up this patch on iochannel, though.<br>
> ><br>
> ><br>
> > On Fri, Jan 10, 2014 at 9:54 AM, Todd Fiala <<a href="mailto:tfiala@google.com">tfiala@google.com</a>> wrote:<br>
> > Okay - so since Abid is seeing it as well, I'm inclined to put in both (1) the makefile fix for non-cmake (i.e. configure-based) makes, and (2) the explicit operator=.<br>
> ><br>
> > We're tracing through an editline failure in a regex test at the moment. These are test failures, though, not build failures. It is probably worth it for me to get those two build break issues in, then, before we resolve all the test failures.<br>
> ><br>
> > -Todd<br>
> ><br>
> ><br>
> > On Fri, Jan 10, 2014 at 9:37 AM, Greg Clayton <<a href="mailto:gclayton@apple.com">gclayton@apple.com</a>> wrote:<br>
> > Patch looks good.<br>
> ><br>
> > On Jan 9, 2014, at 1:10 PM, Steve Pucci <<a href="mailto:spucci@google.com">spucci@google.com</a>> wrote:<br>
> ><br>
> > > Hi all,<br>
> > ><br>
> > > Running the iohandler branch on Ubuntu 12.04 using gcc 4.8.2, using configure rather than CMake, ran into a similar issue as Abid (needed to add -lcurses, and also add back in -ledit; patch attached). I'm getting these test failures:<br>
> > ><br>
> > > Ran 272 tests.<br>
> > > Failing Tests (4)<br>
> > > FAIL: LLDB (suite) :: TestCommandRegex.py (Linux <a href="http://spucci-linux.mtv.corp.google.com" target="_blank">spucci-linux.mtv.corp.google.com</a> 3.2.5-gg1336 #1 SMP Thu Aug 29 02:37:18 PDT 2013 x86_64 x86_64)<br>
> > > FAIL: LLDB (suite) :: TestDataFormatterCategories.py (Linux <a href="http://spucci-linux.mtv.corp.google.com" target="_blank">spucci-linux.mtv.corp.google.com</a> 3.2.5-gg1336 #1 SMP Thu Aug 29 02:37:18 PDT 2013 x86_64 x86_64)<br>
> > > FAIL: LLDB (suite) :: TestDataFormatterGlobals.py (Linux <a href="http://spucci-linux.mtv.corp.google.com" target="_blank">spucci-linux.mtv.corp.google.com</a> 3.2.5-gg1336 #1 SMP Thu Aug 29 02:37:18 PDT 2013 x86_64 x86_64)<br>
> > > FAIL: LLDB (suite) :: TestConvenienceVariables.py (Linux <a href="http://spucci-linux.mtv.corp.google.com" target="_blank">spucci-linux.mtv.corp.google.com</a> 3.2.5-gg1336 #1 SMP Thu Aug 29 02:37:18 PDT 2013 x86_64 x86_64)<br>
> > ><br>
> > > We will be looking at these shortly, but we're also tracking a compilation error that's blocking this now on this branch (more about that shortly).<br>
> > ><br>
> > > - Steve<br>
> > ><br>
> > > Patch:<br>
> > ><br>
> > > Index: lib/Makefile<br>
> > > ===================================================================<br>
> > > --- lib/Makefile (revision 198878)<br>
> > > +++ lib/Makefile (working copy)<br>
> > > @@ -148,7 +148,7 @@<br>
> > > # Don't allow unresolved symbols.<br>
> > > LLVMLibsOptions += -Wl,--no-undefined<br>
> > > # Link in python<br>
> > > - LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt<br>
> > > + LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -ledit -lncurses<br>
> > > LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT)<br>
> > > endif<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > On Wed, Jan 8, 2014 at 9:09 AM, Abid, Hafiz <<a href="mailto:Hafiz_Abid@mentor.com">Hafiz_Abid@mentor.com</a>> wrote:<br>
> > > > Great, please check in any changes you need in order to build!<br>
> > > Committed in revision 198773.<br>
> > ><br>
> > > ><br>
> > > > On Jan 7, 2014, at 8:21 AM, Abid, Hafiz <<a href="mailto:Hafiz_Abid@mentor.com">Hafiz_Abid@mentor.com</a>> wrote:<br>
> > > ><br>
> > > > > Hi Greg,<br>
> > > > ><br>
> > > > >> -----Original Message-----<br>
> > > > >> From: <a href="mailto:lldb-dev-bounces@cs.uiuc.edu">lldb-dev-bounces@cs.uiuc.edu</a><br>
> > > > >> [mailto:<a href="mailto:lldb-dev-bounces@cs.uiuc.edu">lldb-dev-bounces@cs.uiuc.edu</a>]<br>
> > > > >> On Behalf Of Greg Clayton<br>
> > > > >> Sent: 02 January 2014 22:57<br>
> > > > >> To: <a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
> > > > >> Subject: [lldb-dev] Everyone: please download, build and test the new<br>
> > > > >> iohandler branch<br>
> > > > >><br>
> > > > >> svn co<br>
> > > > >> https://$<a href="http://USER@llvm.org/svn/llvm-project/lldb/branches/iohandler" target="_blank">USER@llvm.org/svn/llvm-project/lldb/branches/iohandler</a><br>
> > > > >><br>
> > > > >> The first step is to get it building for your platform as I am sure<br>
> > > > >> the Makefiles are out of date.<br>
> > > > >><br>
> > > > >> This branch will soon be merged back into top of tree, but I wanted<br>
> > > > >> to give all the major platforms time to submit patches against this<br>
> > > > >> to get things working on all systems before any buildbots get broken.<br>
> > > > >><br>
> > > > >> The major benefits include:<br>
> > > > >> - editline is not built into the lldb shared library so all IOHandler<br>
> > > > >> objects can use the editline functionality.<br>
> > > > >> - autocomplete now working in the embedded python interpreter<br>
> > > > >> - history now working in the embedded python interpreter<br>
> > > > >> - autocomplete now working for multi-line command entering (like in<br>
> > > > >> "breakpoint command add")<br>
> > > > >> - when editing multiple lines you can use the UP and DOWN arrow keys<br>
> > > > >> to edit previous lines. This makes multi-line expressions and<br>
> > > > >> commands much easier to write and edit. Use ^B and ^N for next/prev<br>
> > > > >> history when in multi- line mode.<br>
> > > > >> - curses is now supported with the new IOHandler infrastructure. To<br>
> > > > >> try this out, run and hit a breakpoint, and type "gui" on the command<br>
> > > > >> line to drop into the curses GUI mode! Lots of stuff isn't hooked up<br>
> > > > >> yet, but I am sure the open source community can help fill in some<br>
> > > > >> new views and improve existing ones.<br>
> > > > >><br>
> > > > >> So please get this building and test this on your system and let us<br>
> > > > >> know what issues you run into.<br>
> > > > ><br>
> > > > > I tried to build this branch using cmake on Ubuntu 12.04 with gcc 4.8.<br>
> > > > > There were some build issues that I fixed as follows.<br>
> > > > ><br>
> > > > > Include limits.h in Editline.cpp for PATH_MAX and libncurses in the cmake<br>
> > > > files.<br>
> > > > > I also noted that libedit version on my system was missing some<br>
> > > > > defines like EL_PROMPT_ESC. I have to get hold of a recent version for<br>
> > > > libedit.<br>
> > > > > After that lldb builds fine on my system. Still have to test it though.<br>
> > > > ><br>
> > > > > I am pasting the changes needed for the build below.<br>
> > > > ><br>
> > > > ><br>
> > > > > Index: source/Host/common/Editline.cpp<br>
> > > > ><br>
> > > > ================================================================<br>
> > > > ===<br>
> > > > > --- source/Host/common/Editline.cpp (revision 198682)<br>
> > > > > +++ source/Host/common/Editline.cpp (working copy)<br>
> > > > > @@ -15,6 +14,8 @@<br>
> > > > > #include "lldb/Core/StringList.h"<br>
> > > > > #include "lldb/Host/Host.h"<br>
> > > > ><br>
> > > > > +#include <limits.h><br>
> > > > > +<br>
> > > > > using namespace lldb;<br>
> > > > > using namespace lldb_private;<br>
> > > > ><br>
> > > > > Index: source/Symbol/ClangASTType.cpp<br>
> > > > ><br>
> > > > ================================================================<br>
> > > > ===<br>
> > > > > --- source/Symbol/ClangASTType.cpp (revision 198682)<br>
> > > > > +++ source/Symbol/ClangASTType.cpp (working copy)<br>
> > > > > @@ -1135,7 +1135,7 @@<br>
> > > > > if (typedef_type)<br>
> > > > > {<br>
> > > > > const TypedefNameDecl *typedef_decl = typedef_type->getDecl();<br>
> > > > > - type_name = typedef_decl-<br>
> > > > >getQualifiedNameAsString(printing_policy);<br>
> > > > > + type_name = typedef_decl->getQualifiedNameAsString();<br>
> > > > > }<br>
> > > > > else<br>
> > > > > {<br>
> > > > > Index: CMakeLists.txt<br>
> > > > ><br>
> > > > ================================================================<br>
> > > > ===<br>
> > > > > --- CMakeLists.txt (revision 198682)<br>
> > > > > +++ CMakeLists.txt (working copy)<br>
> > > > > @@ -265,6 +265,10 @@<br>
> > > > > list(APPEND system_libs execinfo)<br>
> > > > > endif()<br>
> > > > ><br>
> > > > > +if (CMAKE_SYSTEM_NAME MATCHES "Linux")<br>
> > > > > + list(APPEND system_libs ncurses)<br>
> > > > > +endif()<br>
> > > > > +<br>
> > > > > #add_subdirectory(include)<br>
> > > > > add_subdirectory(docs)<br>
> > > > > if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")<br>
> > > > ><br>
> > > > > Regards,<br>
> > > > > Abid<br>
> > > > ><br>
> > > > >><br>
> > > > >> Greg Clayton<br>
> > > > >><br>
> > > > >> _______________________________________________<br>
> > > > >> lldb-dev mailing list<br>
> > > > >> <a href="mailto:lldb-dev@cs.uiuc.edu">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/mailman/listinfo/lldb-dev</a><br>
> > ><br>
> > ><br>
> > > _______________________________________________<br>
> > > lldb-dev mailing list<br>
> > > <a href="mailto:lldb-dev@cs.uiuc.edu">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/mailman/listinfo/lldb-dev</a><br>
> > ><br>
> > > <iohandler-patch.txt><br>
> ><br>
> > _______________________________________________<br>
> > lldb-dev mailing list<br>
> > <a href="mailto:lldb-dev@cs.uiuc.edu">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/mailman/listinfo/lldb-dev</a><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > Todd Fiala | Software Engineer | <a href="mailto:tfiala@google.com">tfiala@google.com</a> | <a href="tel:650-943-3180" value="+16509433180">650-943-3180</a><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > Todd Fiala | Software Engineer | <a href="mailto:tfiala@google.com">tfiala@google.com</a> | <a href="tel:650-943-3180" value="+16509433180">650-943-3180</a><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > Todd Fiala | Software Engineer | <a href="mailto:tfiala@google.com">tfiala@google.com</a> | <a href="tel:650-943-3180" value="+16509433180">650-943-3180</a><br>
> ><br>
> > <spucci-2014-01-10_r2.diff><br>
><br>
><br>
><br>
><br>
><br>
> --<br>
> Todd Fiala | Software Engineer | <a href="mailto:tfiala@google.com">tfiala@google.com</a> | <a href="tel:650-943-3180" value="+16509433180">650-943-3180</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Todd Fiala | Software Engineer | <a href="mailto:tfiala@google.com">tfiala@google.com</a> | <a href="tel:650-943-3180" value="+16509433180">650-943-3180</a><br>
><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);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">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div>