Re: [lldb-dev] Understanding debugger launch events sequence

2016-02-01 Thread via lldb-dev
Great, thanks for the confirmation. Sent from my iPhone > On Feb 1, 2016, at 1:32 AM, Pavel Labath wrote: > >> On 29 January 2016 at 18:43, Jeffrey Tan wrote: >> Thanks Jim. Is this true for other platforms? Our IDE is going to support >> Mac and Linux and may extend to Windows some time later

Re: [lldb-dev] Understanding debugger launch events sequence

2016-02-01 Thread Pavel Labath via lldb-dev
On 29 January 2016 at 18:43, Jeffrey Tan wrote: > Thanks Jim. Is this true for other platforms? Our IDE is going to support > Mac and Linux and may extend to Windows some time later. AFAIK, windows spawns a separate thread to do the actual debugging, but this is hidden from you, and you can carry

Re: [lldb-dev] Understanding debugger launch events sequence

2016-01-29 Thread Jeffrey Tan via lldb-dev
Thanks. That's fine, just want to confirm the behavior and my understanding. I can definitely deal with the difference between attach/launch myself. On Fri, Jan 29, 2016 at 1:41 PM, Jim Ingham wrote: > I don’t think we can change this behavior, since other clients are relying > on the way it is

Re: [lldb-dev] Understanding debugger launch events sequence

2016-01-29 Thread Jim Ingham via lldb-dev
I don’t think we can change this behavior, since other clients are relying on the way it is now. In any case, attach won't return till it is successful, and presumably you know you are attaching, so I don’t think there’s any ambiguity about what is going on, even if you don’t get a stop event.

Re: [lldb-dev] Understanding debugger launch events sequence

2016-01-29 Thread Jeffrey Tan via lldb-dev
Jim/Pavel, my toy code works reliably after using SBListener with SBTarget.Launch/Attach. One thing I noticed is: If I set "stop_at_entry=True" for SBTarget.Launch(), I will get a stop event of eStopReasonSignal at loader breakpoint. However SBTarget.AttachXXX() will pause the target process withou

Re: [lldb-dev] Understanding debugger launch events sequence

2016-01-29 Thread Jim Ingham via lldb-dev
I can’t comment on Windows, I don’t know what requirements the Windows API’s place on the debugger. Its been a while since I’ve worked on Linux, but I don’t remember anything that would privilege one thread over another. lldb supports running multiple targets and processes in one debugger, an

Re: [lldb-dev] Understanding debugger launch events sequence

2016-01-29 Thread Jeffrey Tan via lldb-dev
Thanks Jim. Is this true for other platforms? Our IDE is going to support Mac and Linux and may extend to Windows some time later. Just curious, why does Xcode create multiple SBDebuggers assuming it is debugging a single process? Are you talking about multiple-processes scenario(One SBDebugger for

Re: [lldb-dev] Understanding debugger launch events sequence

2016-01-29 Thread Jim Ingham via lldb-dev
There is no requirement that the lldb API’s be called on a particular thread on OS X. LLDB tries to be robust against being called from multiple threads simultaneously for the same debugger, but you can still make it fall over if you try hard, particularly if you allow multiple threads to resta

Re: [lldb-dev] Understanding debugger launch events sequence

2016-01-29 Thread Jeffrey.fudan via lldb-dev
Great, this is very helpful, will give a try. Btw: is there any threading requirement of lldb API? For example, are all the Apis must be called on the event thread or they are free to be called on any thread? I know windows debug API has some limitation on this. Sent from my iPad > On Jan 29, 2

Re: [lldb-dev] Understanding debugger launch events sequence

2016-01-29 Thread Pavel Labath via lldb-dev
Hi Jeffrey, I see a couple of problems with the way you are using the lldb's API. The main problem is you are launching the target via the command-line API, which does not allow you to specify the listener upon creation. When you start it this way all events go to the default debugger listener (de