[lldb-dev] Everyone: please download, build and test the new iohandler branch

Todd Fiala tfiala at google.com
Fri Jan 10 10:40:21 PST 2014


There was a slight tweak to the change above to deal with modifications
that just came in on IOHandler's TreeItem.

Here is the change submission:

Sending        lib/Makefile
Sending        source/Core/IOHandler.cpp
Transmitting file data ..

Committed revision 198951.


Final patch attached.



On Fri, Jan 10, 2014 at 10:21 AM, Todd Fiala <tfiala at google.com> wrote:

> 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:
>
> Index: source/Core/IOHandler.cpp
> ===================================================================
> --- source/Core/IOHandler.cpp   (revision 198946)
> +++ source/Core/IOHandler.cpp   (working copy)
> @@ -2251,7 +2251,24 @@
>          m_did_calculate_children (false)
>      {
>      }
> -
> +
> +    TreeItem &
> +    operator=(const TreeItem &rhs)
> +    {
> +        if (this != &rhs)
> +        {
> +            m_parent = rhs.m_parent;
> +            m_delegate = rhs.m_delegate;
> +            m_user_data = rhs.m_user_data;
> +            m_row_idx = rhs.m_row_idx;
> +            m_children = rhs.m_children;
> +            m_might_have_children = rhs.m_might_have_children;
> +            m_is_expanded = rhs.m_is_expanded;
> +            m_did_calculate_children = rhs.m_did_calculate_children;
> +        }
> +        return *this;
> +    }
> +
>      size_t
>      GetDepth () const
>      {
> Index: lib/Makefile
> ===================================================================
> --- lib/Makefile        (revision 198946)
> +++ lib/Makefile        (working copy)
> @@ -148,7 +148,7 @@
>      # Don't allow unresolved symbols.
>      LLVMLibsOptions += -Wl,--no-undefined
>      # Link in python
> -    LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt
> +    LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -ledit -lncurses
>      LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT)
>  endif
>
> 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.
>
>
> On Fri, Jan 10, 2014 at 9:54 AM, Todd Fiala <tfiala at google.com> wrote:
>
>> 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=.
>>
>> 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.
>>
>> -Todd
>>
>>
>> On Fri, Jan 10, 2014 at 9:37 AM, Greg Clayton <gclayton at apple.com> wrote:
>>
>>> Patch looks good.
>>>
>>> On Jan 9, 2014, at 1:10 PM, Steve Pucci <spucci at google.com> wrote:
>>>
>>> > Hi all,
>>> >
>>> > 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:
>>> >
>>> > Ran 272 tests.
>>> > Failing Tests (4)
>>> > FAIL: LLDB (suite) :: TestCommandRegex.py (Linux
>>> spucci-linux.mtv.corp.google.com 3.2.5-gg1336 #1 SMP Thu Aug 29
>>> 02:37:18 PDT 2013 x86_64 x86_64)
>>> > FAIL: LLDB (suite) :: TestDataFormatterCategories.py (Linux
>>> spucci-linux.mtv.corp.google.com 3.2.5-gg1336 #1 SMP Thu Aug 29
>>> 02:37:18 PDT 2013 x86_64 x86_64)
>>> > FAIL: LLDB (suite) :: TestDataFormatterGlobals.py (Linux
>>> spucci-linux.mtv.corp.google.com 3.2.5-gg1336 #1 SMP Thu Aug 29
>>> 02:37:18 PDT 2013 x86_64 x86_64)
>>> > FAIL: LLDB (suite) :: TestConvenienceVariables.py (Linux
>>> spucci-linux.mtv.corp.google.com 3.2.5-gg1336 #1 SMP Thu Aug 29
>>> 02:37:18 PDT 2013 x86_64 x86_64)
>>> >
>>> > 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).
>>> >
>>> >  - Steve
>>> >
>>> > Patch:
>>> >
>>> > Index: lib/Makefile
>>> > ===================================================================
>>> > --- lib/Makefile      (revision 198878)
>>> > +++ lib/Makefile      (working copy)
>>> > @@ -148,7 +148,7 @@
>>> >      # Don't allow unresolved symbols.
>>> >      LLVMLibsOptions += -Wl,--no-undefined
>>> >      # Link in python
>>> > -    LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt
>>> > +    LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -ledit -lncurses
>>> >      LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT)
>>> >  endif
>>> >
>>> >
>>> >
>>> >
>>> > On Wed, Jan 8, 2014 at 9:09 AM, Abid, Hafiz <Hafiz_Abid at mentor.com>
>>> wrote:
>>> > > Great, please check in any changes you need in order to build!
>>> > Committed in revision 198773.
>>> >
>>> > >
>>> > > On Jan 7, 2014, at 8:21 AM, Abid, Hafiz <Hafiz_Abid at mentor.com>
>>> wrote:
>>> > >
>>> > > > Hi Greg,
>>> > > >
>>> > > >> -----Original Message-----
>>> > > >> From: lldb-dev-bounces at cs.uiuc.edu
>>> > > >> [mailto:lldb-dev-bounces at cs.uiuc.edu]
>>> > > >> On Behalf Of Greg Clayton
>>> > > >> Sent: 02 January 2014 22:57
>>> > > >> To: lldb-dev at cs.uiuc.edu
>>> > > >> Subject: [lldb-dev] Everyone: please download, build and test the
>>> new
>>> > > >> iohandler branch
>>> > > >>
>>> > > >> svn co
>>> > > >> https://$USER@llvm.org/svn/llvm-project/lldb/branches/iohandler
>>> > > >>
>>> > > >> The first step is to get it building for your platform as I am
>>> sure
>>> > > >> the Makefiles are out of date.
>>> > > >>
>>> > > >> This branch will soon be merged back into top of tree, but I
>>> wanted
>>> > > >> to give all the major platforms time to submit patches against
>>> this
>>> > > >> to get things working on all systems before any buildbots get
>>> broken.
>>> > > >>
>>> > > >> The major benefits include:
>>> > > >> - editline is not built into the lldb shared library so all
>>> IOHandler
>>> > > >> objects can use the editline functionality.
>>> > > >> - autocomplete now working in the embedded python interpreter
>>> > > >> - history now working in the embedded python interpreter
>>> > > >> - autocomplete now working for multi-line command entering (like
>>> in
>>> > > >> "breakpoint command add")
>>> > > >> - when editing multiple lines you can use the UP and DOWN arrow
>>> keys
>>> > > >> to edit previous lines. This makes multi-line expressions and
>>> > > >> commands much easier to write and edit. Use ^B and ^N for
>>> next/prev
>>> > > >> history when in multi- line mode.
>>> > > >> - curses is now supported with the new IOHandler infrastructure.
>>> To
>>> > > >> try this out, run and hit a breakpoint, and type "gui" on the
>>> command
>>> > > >> line to drop into the curses GUI mode! Lots of stuff isn't hooked
>>> up
>>> > > >> yet, but I am sure the open source community can help fill in some
>>> > > >> new views and improve existing ones.
>>> > > >>
>>> > > >> So please get this building and test this on your system and let
>>> us
>>> > > >> know what issues you run into.
>>> > > >
>>> > > > I tried to build this branch using cmake on Ubuntu 12.04 with gcc
>>> 4.8.
>>> > > > There were some build issues that I fixed as follows.
>>> > > >
>>> > > > Include limits.h in Editline.cpp for PATH_MAX and libncurses in
>>> the cmake
>>> > > files.
>>> > > > I also noted that libedit version on my system was missing some
>>> > > > defines like EL_PROMPT_ESC. I have to get hold of a recent version
>>> for
>>> > > libedit.
>>> > > > After that lldb builds fine on my system. Still have to test it
>>> though.
>>> > > >
>>> > > > I am pasting the changes needed for the build below.
>>> > > >
>>> > > >
>>> > > > Index: source/Host/common/Editline.cpp
>>> > > >
>>> > > ================================================================
>>> > > ===
>>> > > > --- source/Host/common/Editline.cpp (revision 198682)
>>> > > > +++ source/Host/common/Editline.cpp (working copy)
>>> > > > @@ -15,6 +14,8 @@
>>> > > > #include "lldb/Core/StringList.h"
>>> > > > #include "lldb/Host/Host.h"
>>> > > >
>>> > > > +#include <limits.h>
>>> > > > +
>>> > > > using namespace lldb;
>>> > > > using namespace lldb_private;
>>> > > >
>>> > > > Index: source/Symbol/ClangASTType.cpp
>>> > > >
>>> > > ================================================================
>>> > > ===
>>> > > > --- source/Symbol/ClangASTType.cpp  (revision 198682)
>>> > > > +++ source/Symbol/ClangASTType.cpp  (working copy)
>>> > > > @@ -1135,7 +1135,7 @@
>>> > > >         if (typedef_type)
>>> > > >         {
>>> > > >             const TypedefNameDecl *typedef_decl =
>>> typedef_type->getDecl();
>>> > > > -            type_name = typedef_decl-
>>> > > >getQualifiedNameAsString(printing_policy);
>>> > > > +            type_name = typedef_decl->getQualifiedNameAsString();
>>> > > >         }
>>> > > >         else
>>> > > >         {
>>> > > > Index: CMakeLists.txt
>>> > > >
>>> > > ================================================================
>>> > > ===
>>> > > > --- CMakeLists.txt  (revision 198682)
>>> > > > +++ CMakeLists.txt  (working copy)
>>> > > > @@ -265,6 +265,10 @@
>>> > > >   list(APPEND system_libs execinfo)
>>> > > > endif()
>>> > > >
>>> > > > +if (CMAKE_SYSTEM_NAME MATCHES "Linux")
>>> > > > +  list(APPEND system_libs ncurses)
>>> > > > +endif()
>>> > > > +
>>> > > > #add_subdirectory(include)
>>> > > > add_subdirectory(docs)
>>> > > > if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
>>> > > >
>>> > > > Regards,
>>> > > > Abid
>>> > > >
>>> > > >>
>>> > > >> Greg Clayton
>>> > > >>
>>> > > >> _______________________________________________
>>> > > >> lldb-dev mailing list
>>> > > >> lldb-dev at cs.uiuc.edu
>>> > > >> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>>> >
>>> >
>>> > _______________________________________________
>>> > lldb-dev mailing list
>>> > lldb-dev at cs.uiuc.edu
>>> > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>>> >
>>> > <iohandler-patch.txt>
>>>
>>> _______________________________________________
>>> lldb-dev mailing list
>>> lldb-dev at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>>>
>>
>>
>>
>> --
>>  Todd Fiala | Software Engineer |  tfiala at google.com |  650-943-3180
>>
>
>
>
> --
> Todd Fiala | Software Engineer |  tfiala at google.com |  650-943-3180
>



-- 
Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140110/93edc3c4/attachment.html>
-------------- next part --------------
Index: source/Core/IOHandler.cpp
===================================================================
--- source/Core/IOHandler.cpp	(revision 198950)
+++ source/Core/IOHandler.cpp	(working copy)
@@ -2262,7 +2262,23 @@
         m_is_expanded (false)
     {
     }
-    
+
+    TreeItem &
+    operator=(const TreeItem &rhs)
+    {
+        if (this != &rhs)
+        {
+            m_parent = rhs.m_parent;
+            m_delegate = rhs.m_delegate;
+            m_identifier = rhs.m_identifier;
+            m_row_idx = rhs.m_row_idx;
+            m_children = rhs.m_children;
+            m_might_have_children = rhs.m_might_have_children;
+            m_is_expanded = rhs.m_is_expanded;
+        }
+        return *this;
+    }
+
     size_t
     GetDepth () const
     {
Index: lib/Makefile
===================================================================
--- lib/Makefile	(revision 198950)
+++ lib/Makefile	(working copy)
@@ -148,7 +148,7 @@
     # Don't allow unresolved symbols.
     LLVMLibsOptions += -Wl,--no-undefined
     # Link in python
-    LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt
+    LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -ledit -lncurses
     LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT)
 endif
 


More information about the lldb-dev mailing list