[lldb-dev] interesting note on build times: configure/make vs. cmake/ninja

Todd Fiala tfiala at google.com
Fri Mar 21 12:13:33 PDT 2014


That looks fine.  I think if we find cases where m_monitor is already
killed when we hit that (or was never established), we can track it down.

I think the !HasExited() guard will likely already cover everything we'd
care about.

Thanks for checking!


On Fri, Mar 21, 2014 at 12:10 PM, Ed Maste <emaste at freebsd.org> wrote:

> > Sounds very likely that your ProcessPOSIX change addressed the issues.
>  Nice job, Ed!  ProcessLinux is nearly entirely ProcessPOSIX, the big diff
> being a different ProcessMonitor and a few minor bits of functionality that
> differ from ProcessFreeBSD.
>
> Hi Todd - I'm now using this change on FreeBSD
> (
> https://github.com/emaste/lldb/commit/e64649d8cd1a171086ace48e2beb587acd0c82e0
> )
>
>      if (!HasExited())
>      {
> -        // Drive the exit event to completion (do not keep the inferior in
> -        // limbo).
> +        assert (m_monitor);
>          m_exit_now = true;
> -
> -        if ((m_monitor == NULL || kill(m_monitor->GetPID(), SIGKILL))
> && error.Success())
> +        if (m_monitor->BringProcessIntoLimbo())
>          {
>              error.SetErrorToErrno();
>              return error;
>
>
> - AFAIK m_monitor cannot be null in ProcessPOSIX::DoDestroy, so I just
> switched to asserting that it is not.
> - BringProcessIntoLimbo() in the FreeBSD and Linux ProcessMonitor is
> poorly named, but just implements ptrace(PT_KILL, ...).  I believe
> this is exactly the behaviour we want from DoDestroy.
>
> On FreeBSD the test suite passes for me, and I'm going to commit the
> change to the copy of LLDB that we ship with the FreeBSD base system.
> Can you tell me if you're happy with this change on Linux as well?
> (If it's not suitable for Linux I can just switch this to be separate
> ProcessFreeBSD::DoDestroy and ProcessLinux::DoDestroy.)
>



-- 
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/20140321/63225198/attachment.html>


More information about the lldb-dev mailing list