<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Is “image search-paths add” supposed to remove all breakpoints from the remote server? I don’t think it should be doing this.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>PathMappingList::Append calls Target::ImageSearchPathsChanged, which calls Target::SetExecutableModule, which calls Target::ClearModules, which removes the breakpoints. But SetExecutableModule doesn’t restore the breakpoints.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>This test I use top-of-tree lldb, built on Ubuntu 12 with a native target. Packet log edited to remove chaff.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>(lldb) log enable gdb-remote packets<o:p></o:p></p><p class=MsoNormal>(lldb) process launch –s<o:p></o:p></p><p class=MsoNormal>Process 18766 launched: '/usr2/tedwood/lldb_test/factlin' (x86_64)<o:p></o:p></p><p class=MsoNormal>(lldb) process status<o:p></o:p></p><p class=MsoNormal>Process 18766 stopped<o:p></o:p></p><p class=MsoNormal>* thread #1, name = 'factlin', stop reason = signal SIGSTOP<o:p></o:p></p><p class=MsoNormal>    frame #0: 0x00007ffff7ddb6b0<o:p></o:p></p><p class=MsoNormal>->  0x7ffff7ddb6b0: movq   %rsp, %rdi<o:p></o:p></p><p class=MsoNormal>    0x7ffff7ddb6b3: callq  0x7ffff7ddf010<o:p></o:p></p><p class=MsoNormal>    0x7ffff7ddb6b8: movq   %rax, %r12<o:p></o:p></p><p class=MsoNormal>    0x7ffff7ddb6bb: movl   0x2215ff(%rip), %eax<o:p></o:p></p><p class=MsoNormal>(lldb) b main<o:p></o:p></p><p class=MsoNormal><  15> send packet: $Z0,400586,1#4a<o:p></o:p></p><p class=MsoNormal><   6> read packet: $OK#9a<o:p></o:p></p><p class=MsoNormal>Breakpoint 1: where = factlin`main + 22 at factorial.c:32, address = 0x0000000000400586<o:p></o:p></p><p class=MsoNormal>(lldb) br l<o:p></o:p></p><p class=MsoNormal>Current breakpoints:<o:p></o:p></p><p class=MsoNormal>1: name = 'main', locations = 1, resolved = 1, hit count = 0<o:p></o:p></p><p class=MsoNormal>  1.1: where = factlin`main + 22 at factorial.c:32, address = 0x0000000000400586, resolved, hit count = 0 <o:p></o:p></p><p class=MsoNormal>(lldb) image search-paths add /local /tmp<o:p></o:p></p><p class=MsoNormal><  15> send packet: $z0,400586,1#6a<o:p></o:p></p><p class=MsoNormal><   6> read packet: $OK#9a<o:p></o:p></p><p class=MsoNormal><  15> send packet: $z0,400410,1#5c<o:p></o:p></p><p class=MsoNormal><   6> read packet: $OK#9a<o:p></o:p></p><p class=MsoNormal>(lldb) br l<o:p></o:p></p><p class=MsoNormal>Current breakpoints:<o:p></o:p></p><p class=MsoNormal>1: name = 'main', locations = 1<o:p></o:p></p><p class=MsoNormal>  1.1: where = factlin`main + 22 at factorial.c:32, address = factlin[0x0000000000400586], unresolved, hit count = 0 <o:p></o:p></p><p class=MsoNormal>(lldb) c<o:p></o:p></p><p class=MsoNormal><   5> send packet: $c#63<o:p></o:p></p><p class=MsoNormal>Process 18766 resuming<o:p></o:p></p><p class=MsoNormal>Factorial of 10 is 3628800<o:p></o:p></p><p class=MsoNormal><   7> read packet: $W00#b7<o:p></o:p></p><p class=MsoNormal>Process 18766 exited with status = 0 (0x00000000)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>As you can see, the breakpoint at main was removed on lldb-server, but shows as active in the breakpoint list. When I continue, the breakpoint isn’t hit, and the target runs to completion.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>--<o:p></o:p></p><p class=MsoNormal>Qualcomm Innovation Center, Inc.<o:p></o:p></p><p class=MsoNormal>The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>