[lldb-dev] Freeze in lldb [Re: [PATCH][Linux] compilation fails on linux after revision 196787]

Xavier de Gaye xdegaye at gmail.com
Wed Dec 11 08:19:19 PST 2013


Yes, testing r196786 does not cause lldb to freeze, see my previous
post.

Xavier

On 12/11/2013 05:10 PM, Sylvestre Ledru wrote:
 > Did you try to revert the commits which introduced that ?
 > Did it fix the freeze ?
 >
 > Thanks
 > S
 >
 > On 11/12/2013 16:42, Xavier de Gaye wrote:
 >> This has been commited at r196830 and fixes the build but there is still
 >> an  issue on linux with r196787.
 >>
 >> When lldb is built on linux at r196786 (the previous revision) with the
 >> attached  sin_len.patch (to fix temporarily the issue
 >> http://llvm.org/bugs/show_bug.cgi?id=18210 so as to allow the build),
 >> then lldb  stops correctly at main in the following simple test:
 >>     breakpoint set --name main
 >>     run
 >>
 >> When lldb is built on linux at r196787 with the sin_len.patch and with
 >> the changes made in r196830 applied (same as the patch proposed in the
 >> OP), the above simple test fails and lldb is stuck in a futex syscall.
 >>
 >> Xavier
 >>
 >>
 >> On 12/10/2013 10:00 PM, Greg Clayton wrote:
 >> > Looks good.
 >> >
 >> > On Dec 9, 2013, at 1:54 PM, Xavier de Gaye wrote:
 >> >
 >> >> The following patch fixes this.
 >> >>
 >> >> Xavier
 >> >>
 >> >>
 >> >> diff --git a/tools/lldb/source/Plugins/Process/Linux/LinuxThread.cpp b/tools/lldb/source/Plugins/Process/Linux/LinuxThread.cpp
 >> >> --- a/tools/lldb/source/Plugins/Process/Linux/LinuxThread.cpp
 >> >> +++ b/tools/lldb/source/Plugins/Process/Linux/LinuxThread.cpp
 >> >> @@ -12,6 +12,10 @@
 >> >> // Other libraries and framework includes
 >> >> // Project includes
 >> >> #include "LinuxThread.h"
 >> >> +#include "lldb/Core/State.h"
 >> >> +#include "ProcessPOSIX.h"
 >> >> +#include "ProcessMonitor.h"
 >> >> +#include "ProcessPOSIXLog.h"
 >> >>
 >> >> using namespace lldb;
 >> >> using namespace lldb_private;
 >> >> diff --git a/tools/lldb/source/Plugins/Process/Linux/LinuxThread.h b/tools/lldb/source/Plugins/Process/Linux/LinuxThread.h
 >> >> --- a/tools/lldb/source/Plugins/Process/Linux/LinuxThread.h
 >> >> +++ b/tools/lldb/source/Plugins/Process/Linux/LinuxThread.h
 >> >> @@ -33,7 +33,7 @@
 >> >>
 >> >>      // POSIXThread overrides
 >> >>      virtual bool
 >> >> -    LinuxThread::Resume();
 >> >> +    Resume();
 >> >>
 >> >>      virtual void
 >> >>      RefreshStateAfterStop();
 >> >> diff --git a/tools/lldb/source/Plugins/Process/Linux/ProcessLinux.cpp b/tools/lldb/source/Plugins/Process/Linux/ProcessLinux.cpp
 >> >> --- a/tools/lldb/source/Plugins/Process/Linux/ProcessLinux.cpp
 >> >> +++ b/tools/lldb/source/Plugins/Process/Linux/ProcessLinux.cpp
 >> >> @@ -182,7 +182,7 @@
 >> >>      uint32_t thread_count = m_thread_list.GetSize(false);
 >> >>      for (uint32_t i = 0; i < thread_count; ++i)
 >> >>      {
 >> >> -        POSIXThread *thread = static_cast<POSIXThread*>(
 >> >> +        LinuxThread *thread = static_cast<LinuxThread*>(
 >> >>              m_thread_list.GetThreadAtIndex(i, false).get());
 >> >>          did_resume = thread->Resume() || did_resume;
 >> >>      }
 >> >> diff --git a/tools/lldb/source/Plugins/Process/Linux/ProcessLinux.h b/tools/lldb/source/Plugins/Process/Linux/ProcessLinux.h
 >> >> --- a/tools/lldb/source/Plugins/Process/Linux/ProcessLinux.h
 >> >> +++ b/tools/lldb/source/Plugins/Process/Linux/ProcessLinux.h
 >> >> @@ -60,6 +60,9 @@
 >> >>      virtual bool
 >> >>      UpdateThreadList(lldb_private::ThreadList &old_thread_list, lldb_private::ThreadList &new_thread_list);
 >> >>
 >> >> +    virtual lldb_private::Error
 >> >> +    DoResume();
 >> >> +



More information about the lldb-dev mailing list