[lldb-dev] SBTarget::Launch return SBProcess with PID=0

Greg Clayton gclayton at apple.com
Tue Apr 1 11:43:20 PDT 2014


The easiest way to see what is going on is to enable gdb-remote packet logging. Make sure you tell Codelight to source the init files when you create your debugger:

// Init LLDB
SBDebugger::Initialize();

// Create debugger
bool source_init_files = true;
SBDebugger debugger = SBDebugger::Create(source_init_files);

Then add the following line to your ~/.lldbinit file:

log enable -f /tmp/packets.txt gdb-remote packets

Then run and watch your pid come back with zero. Quit code light and attach the packets.txt file to a reply email and we can see what is going on.

Did you follow the code signing instructions? You might want to verify that your command line LLDB can indeed debug something:

% ./lldb /bin/ls
(lldb) process launch


Make sure it completes successfully.



On Apr 1, 2014, at 1:19 AM, Eran Ifrah <eran.ifrah at gmail.com> wrote:

> Hello,
> 
> I have passed most of the barriers I had in order to integrate lldb within codeite and I have started testing the code on OSX.
> I have OSX 10.9 and I compiled lldb (btw, an enforcement in CMake to ensure that Xcode is installed would be nice)
> When I start debugging from within codelite using lldb, the call to m_target.Launch(...) where (m_target is of type SBTarget) returns a valid SBProcess, i.e. m_target.Launch().IsValid() is true
> 
> However, calling m_target.GetProcess().GetProcessID() returns 0
> Doing "ps -ef|grep TestLLDB" in the Terminal.app shows that the debuggee process was indeed launched ( I can confirm that the parent process is codelite)
> 
> Any ideas why it may return 0?
> 
> TIA,
> 
> -- 
> Eran Ifrah
> Author of codelite, a cross platform open source C/C++ IDE: http://www.codelite.org
> wxCrafter, a wxWidgets RAD: http://wxcrafter.codelite.org
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev




More information about the lldb-dev mailing list