Re: [lldb-dev] Using LLDB C++ API for automated debugging sessions

2019-07-18 Thread Jayvee Neumann via lldb-dev
Thank you Jim and Greg, for your help. I will be careful with threads and I will also switch to using launch info. Kind regards Jayvee Am Do., 18. Juli 2019 um 19:19 Uhr schrieb Jim Ingham : > The main problem with trying to run a debug session multithreaded is > coordinating execution control.

Re: [lldb-dev] Using LLDB C++ API for automated debugging sessions

2019-07-18 Thread Jim Ingham via lldb-dev
The main problem with trying to run a debug session multithreaded is coordinating execution control. Thread A gets a variable list and iterates over it to get child values. Thread B issues a "step" command. The API's thread A calls will either fail (because the target is running) or maybe fet

Re: [lldb-dev] Using LLDB C++ API for automated debugging sessions

2019-07-18 Thread Greg Clayton via lldb-dev
> On Jul 18, 2019, at 4:00 AM, Jayvee Neumann wrote: > > Thank you for your help. > > What is the reason for using SBLaunchInfo over calling tgt.Launch with the > launch configuration as a set of parameters? The code is much clearer on what arguments mean what. In your current launch call,

Re: [lldb-dev] Using LLDB C++ API for automated debugging sessions

2019-07-18 Thread Jayvee Neumann via lldb-dev
Thank you for your help. What is the reason for using SBLaunchInfo over calling tgt.Launch with the launch configuration as a set of parameters? Furthermore I do not see a way to set stdout, stdin, and stderr for the launched process by using SBLaunchInfo. I have a question regarding the event lo

Re: [lldb-dev] Using LLDB C++ API for automated debugging sessions

2019-07-12 Thread Greg Clayton via lldb-dev
You need to call SBDebugger::Initialize() before calling SBDebugger::Create(). Also, please use the SBLaunchInfo method for launching if possible where you create a SBLaunchInfo, then call tgt.Launch() with the instance. Other than that, as Jim said, you need to setup an event loop if you don't

Re: [lldb-dev] Using LLDB C++ API for automated debugging sessions

2019-06-26 Thread Jim Ingham via lldb-dev
By default, the SB API's run in "asynchronous" mode, where calls that cause the target to run (launch, continue, etc) return when the target has started running, and then you have to wait on the listener that you registered with the process when you launched it to get notified of state changes.

[lldb-dev] Using LLDB C++ API for automated debugging sessions

2019-06-26 Thread Jayvee Neumann via lldb-dev
Dear LLDB developers, I am currently stuck while using the C++ API of LLDB. I am unable to correctly launch a process. The code I have written looks as follows: int main(int argc, char *argv[]){ LLDBSentry senty; SBDebugger dbg(SBDebugger::Create()); ... const char *exeFilePath = "./target"; cons