<div dir="ltr">Hi Ted,<div><br></div><div>Thanks for the bugreport. </div><div><br></div><div>You are correct, they should be removed. There is a test that was added specifically to track this.</div><div><br></div><div>lldb/test/functionalities/disassembly/TestDisassembleBreakpoint.py<br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 22, 2015 at 3:54 PM, Ted Woodward <span dir="ltr"><<a href="mailto:ted.woodward@codeaurora.org" target="_blank">ted.woodward@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="#0563C1" vlink="#954F72"><div><p class="MsoNormal">Expected behavior when doing a memory read or disassembly is that software breakpoints don’t show up – the original code does.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Using lldb on x86 Linux, I run a test program and set a breakpoint, then disassemble. I get this:<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Process 22519 stopped<u></u><u></u></p><p class="MsoNormal">* thread #1: tid = 22519, 0x00000000004004db test`main(argc=1, argv=0x00007fffffffea58) + 11 at test.c:3, name = 'test', stop reason = breakpoint 1.1<u></u><u></u></p><p class="MsoNormal"> frame #0: 0x00000000004004db test`main(argc=1, argv=0x00007fffffffea58) + 11 at test.c:3<u></u><u></u></p><p class="MsoNormal"> 1 int main (int argc, void **argv)<u></u><u></u></p><p class="MsoNormal"> 2 {<u></u><u></u></p><p class="MsoNormal">-> 3 int i = 1;<u></u><u></u></p><p class="MsoNormal"> 4 int j = 2;<u></u><u></u></p><p class="MsoNormal"> 5 int k = 3;<u></u><u></u></p><p class="MsoNormal"> 6 return 0;<u></u><u></u></p><p class="MsoNormal"> 7 }<u></u><u></u></p><p class="MsoNormal">(lldb) dis <u></u><u></u></p><p class="MsoNormal">test`main:<u></u><u></u></p><p class="MsoNormal"> 0x4004d0 <+0>: pushq %rbp<u></u><u></u></p><p class="MsoNormal"> 0x4004d1 <+1>: movq %rsp, %rbp<u></u><u></u></p><p class="MsoNormal"> 0x4004d4 <+4>: movl %edi, -0x14(%rbp)<u></u><u></u></p><p class="MsoNormal"> 0x4004d7 <+7>: movq %rsi, -0x20(%rbp)<u></u><u></u></p><p class="MsoNormal">-> 0x4004db <+11>: int3 <u></u><u></u></p><p class="MsoNormal"> 0x4004dc <+12>: hlt <u></u><u></u></p><p class="MsoNormal"> 0x4004de <+14>: addl %eax, (%rax)<u></u><u></u></p><p class="MsoNormal"> 0x4004e0 <+16>: addb %al, (%rax)<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Shouldn’t the remote gdbserver (lldb-server, in this case) replace the software breakpoint instructions with the actual opcodes?<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">--<u></u><u></u></p><p class="MsoNormal">Qualcomm Innovation Center, Inc.<u></u><u></u></p><p class="MsoNormal">The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p></div></div><br>_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
<br></blockquote></div><br></div>