[lldb-dev] More linux process control and IOHandler races

Matthew Gardiner mg11 at csr.com
Fri Aug 8 00:24:39 PDT 2014


Shawn Best wrote:
> Hi Matthew,
>
> I think the other stops are perfectly normal.  There are cases where 
> the inferior program will temporarily stop (for example waiting to 
> load dependent libraries, or maybe stepping over multiple instructions 
> in a section of code).  In these 'private stop' cases, it is 
> determined the stop is temporary and it will quietly restart the program.

For a "program launch" where the user does not want to stop at the 
inferior's entry point, then only 1 stop should occur. Compile the 
program I've attached, in linux, it launches a program (/bin/ls - which 
has shared library dependencies on my system) with a tracer and wait for 
stops. Perhaps there's good reason for the other 2 stops when lldb is 
the debugger, I'm just unaware of them right now.

Jim Ingham, I think may be alluding to other reasons why we see 3 stops 
on "program launch" in his mail on this thread, but I've not digested 
that mail thoroughly yet.

>
> In the case where the program is meant to stop (i.e. hitting a 
> breakpoint) the event is broadcast so the state machine in 
> HandleProcessEvents picks it up and changes the public state to stop, 
> dumps some information and pops the IOHandler so the user can interact 
> with the command line.

Yeah, agreed.
>
> I went through the same steps as you chasing this problem.  I also 
> stepped through the equivalent code on OSX, which does it completely 
> different and bypasses this issue.
>

Ok, fair enough. I don't know the differences between OSX and linux, or 
why as you say, a completely different flow happens which avoids our 
current problem.

Matt





Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Keep up to date with CSR on our technical blog, www.csr.com/blog, CSR people blog, www.csr.com/people, YouTube, www.youtube.com/user/CSRplc, Facebook, www.facebook.com/pages/CSR/191038434253534, or follow us on Twitter at www.twitter.com/CSR_plc.
New for 2014, you can now access the wide range of products powered by aptX at www.aptx.com.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: text/x-csrc
Size: 1080 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140808/4d945001/attachment.c>


More information about the lldb-dev mailing list