<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hello, everyone<div><br><div>I am using LLDB API to implement a gui debugger, but if I set a breakpoint using the following code:<div><br></div><div><div><font face="Courier New, sans-serif" size="2">// variable i is the line number to set breakpoint at.</font></div><div><font face="Courier New, sans-serif" size="2">SBBreakpoint b = m_target.BreakpointCreateByLocation(m_target.GetExecutable().GetFilename(), i);</font></div><div><font face="Courier New, sans-serif" size="2">qDebug("Created Breakpoint %s At Line %d.", qPrintable(QString::number(b.GetNumLocations()).toLocal8Bit()), i);</font></div></div><div><br></div><div>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:</div></div></div><div><font face="Courier New, sans-serif" size="2"><br></font></div><div><div><font face="Courier New, sans-serif" size="2">(lldb) r</font></div><div><font face="Courier New, sans-serif" size="2">Process 14932 launched: '/home/szm/Documents/workSpace/qt/build-studio2-LLVM_qt5-Debug/studio2' (x86_64)</font></div><div><font face="Courier New, sans-serif" size="2">Process 14932 stopped and restarted: thread 1 received signal: SIGCHLD</font></div><div><font face="Courier New, sans-serif" size="2" color="#008a17">Created Breakpoint 0 At Line 7. <-- this is my program's output.</font></div><div><font face="Courier New, sans-serif" size="2">Process 14932 stopped and restarted: thread 9 received signal: SIGCHLD</font></div><div><font face="Courier New, sans-serif" size="2">Process 14932 stopped</font></div><div><font face="Courier New, sans-serif" size="2">* thread #9: tid = 14953, 0x00007f1c5d5fa102 liblldb.so`ProcessMonitor::ServeOperation(ProcessMonitor::OperationArgs*) + 50, name = 'operation', stop reason = invalid address (fault address: 0x11)</font></div><div><font face="Courier New, sans-serif" size="2"> frame #0: 0x00007f1c5d5fa102 liblldb.so`ProcessMonitor::ServeOperation(ProcessMonitor::OperationArgs*) + 50</font></div><div><font face="Courier New, sans-serif" size="2">liblldb.so`ProcessMonitor::ServeOperation(ProcessMonitor::OperationArgs*) + 50:</font></div><div><font face="Courier New, sans-serif" size="2">-> 0x7f1c5d5fa102: callq *0x10(%rdx)</font></div><div><font face="Courier New, sans-serif" size="2"> 0x7f1c5d5fa105: movq %rbp, %rdi</font></div><div><font face="Courier New, sans-serif" size="2"> 0x7f1c5d5fa108: callq 0x7f1c5c8c1a80 ; symbol stub for: sem_post</font></div><div><font face="Courier New, sans-serif" size="2"> 0x7f1c5d5fa10d: jmp 0x7f1c5d5fa0f0 ; ProcessMonitor::ServeOperation(ProcessMonitor::OperationArgs*) + 32</font></div><div><font face="Courier New, sans-serif" size="2">(lldb) </font></div></div><div><br></div><div>Seems that the program got SIGCHLD because the "invalid address", but I have no idea how to fix it. (<span style="font-size: 12pt;">I'm using ubuntu 14.04 with lldb-3.4-dev from apt-get.)</span></div><div><br></div><div>Thanks,</div><div>Song Ziming</div><div><br></div> </div></body>
</html>