[lldb-dev] API got SIGCHLD on hitting the breakpoint

Ziming Song s.ziming at hotmail.com
Thu Dec 18 00:29:28 PST 2014


Hello, everyone
I am using LLDB API to implement a gui debugger, but if I set a breakpoint using the following code:
// variable i is the line number to set breakpoint at.SBBreakpoint b = m_target.BreakpointCreateByLocation(m_target.GetExecutable().GetFilename(), i);qDebug("Created Breakpoint %s At Line %d.", qPrintable(QString::number(b.GetNumLocations()).toLocal8Bit()), i);
When I launch the program using m_target.LaunchSimple(NULL, NULL, "/") and when the target hit the breakpoint, the gui debugger crashes and exits. If I start the gui debugger using lldb I can see the following output:
(lldb) rProcess 14932 launched: '/home/szm/Documents/workSpace/qt/build-studio2-LLVM_qt5-Debug/studio2' (x86_64)Process 14932 stopped and restarted: thread 1 received signal: SIGCHLDCreated Breakpoint 0 At Line 7.   <-- this is my program's output.Process 14932 stopped and restarted: thread 9 received signal: SIGCHLDProcess 14932 stopped* thread #9: tid = 14953, 0x00007f1c5d5fa102 liblldb.so`ProcessMonitor::ServeOperation(ProcessMonitor::OperationArgs*) + 50, name = 'operation', stop reason = invalid address (fault address: 0x11)    frame #0: 0x00007f1c5d5fa102 liblldb.so`ProcessMonitor::ServeOperation(ProcessMonitor::OperationArgs*) + 50liblldb.so`ProcessMonitor::ServeOperation(ProcessMonitor::OperationArgs*) + 50:-> 0x7f1c5d5fa102:  callq  *0x10(%rdx)   0x7f1c5d5fa105:  movq   %rbp, %rdi   0x7f1c5d5fa108:  callq  0x7f1c5c8c1a80            ; symbol stub for: sem_post   0x7f1c5d5fa10d:  jmp    0x7f1c5d5fa0f0            ; ProcessMonitor::ServeOperation(ProcessMonitor::OperationArgs*) + 32(lldb) 
Seems that the program got SIGCHLD because the "invalid address", but I have no idea how to fix it. (I'm using ubuntu 14.04 with lldb-3.4-dev from apt-get.)
Thanks,Song Ziming
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20141218/3b1e8c9a/attachment.html>


More information about the lldb-dev mailing list