[lldb-dev] SBTarget::Launch return SBProcess with PID=0
Piotr Rak
piotr.rak at gmail.com
Tue Apr 1 15:06:53 PDT 2014
Hi,
/P
2014-04-01 21:34 GMT+02:00 Eran Ifrah <eran.ifrah at gmail.com>:
> Thanks. I decided to debug it and see where it fails. So I built
> liblldb.3.5.0.dylib in debug mode and debugged the Launch function...
>
> It turns out that it requires the debugserver and it assumes that it
> exists under LLDB.framework/
> however, I have no such directory within my cmake build :P
>
> Now, "my" debugserver executable terminates immediately after execution:
>
> $debugserver
> killed: 9
> $
> Running it under the debugger shows nothing significant (I will try to dig
> into this later also...)
>
>
It might be worthless, but http://llvm.org/PR19245 contains uncooked patch,
fixing possibly related issue for linux.
Story was that when launch failed process pid was 0 lldb was considering it
launching (running), and expected result of kill(0, 9) was suicide. I carry
it right now, and it caused no noticeable issues and was passing testsuite
beside fixing this part of bug.
My grudge at this time was - why ProcessGDBRemote doesn't need that change
in lldb_private::Process IIRC.
I was also not certain if it is correct way to fix it, but maybe it will
give some hint...
There seems to be a difference that here it also calls DoDestroy? or
something alike in this codepath, linux at least required explicitly to
ask kill process that thought it is running.
I won't be able to look at any of those in near future, but it ringed the
bell...
/P
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140402/3611c805/attachment.html>
More information about the lldb-dev
mailing list