<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Breakpoint opcode triggering SIGBUS on Nexus 6"
href="https://llvm.org/bugs/show_bug.cgi?id=26632">26632</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Breakpoint opcode triggering SIGBUS on Nexus 6
</td>
</tr>
<tr>
<th>Product</th>
<td>lldb
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>lldb-dev@lists.llvm.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ewan@codeplay.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, tberghammer@google.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=15910" name="attach_15910" title="Source and arm binaries">attachment 15910</a> <a href="attachment.cgi?id=15910&action=edit" title="Source and arm binaries">[details]</a></span>
Source and arm binaries
r260367(<a href="http://reviews.llvm.org/D16853">http://reviews.llvm.org/D16853</a>) which changed the arm breakpoint
opcodes introduced a bug on Nexus 6 Armv7.
Whenever a breakpoint is hit it triggers a SIGBUS, seen when compiling with
both thumb and 32 bit.
Reverting the commit removes this problem. Note, need to rebuild lldb-server.
Contrived example attached, building source file fact.c using NDK r10e with the
following command lines.
~/Google/arm32_android-toolchain/bin/arm-linux-androideabi-gcc-4.9 fact.c -O0
-marm -fPIE -pie -o fact_32bit.out
~/Google/arm32_android-toolchain/bin/arm-linux-androideabi-gcc-4.9 fact.c -O0
-mthumb -fPIE -pie -o fact_thumb.out
On device
./lldb-server g 127.0.0.1:1234 fact_thumb.out
On host
(lldb) target create ~/Desktop/Scratch/android/fact_thumb.out
Current executable set to '~/Desktop/Scratch/android/fact_thumb.out' (arm).
(lldb) gdb-remote localhost:1234
Process 5109 stopped
* thread #1: tid = 5109, 0xb6f6af88, name = 'fact_thumb.out', stop reason =
signal SIGSTOP
frame #0: 0xb6f6af88
-> 0xb6f6af88: mov r0, sp
0xb6f6af8c: blx 0xb6f71304
0xb6f6af90: mov pc, r0
0xb6f6af94: addlt r11, r4, r0, lsl r5
(lldb) b main
Breakpoint 1: where = fact_thumb.out`main, address = 0xb6fb3370
(lldb) c
Process 5109 resuming
Process 5109 stopped
* thread #1: tid = 5109, 0xb6fb32a0 fact_thumb.out`_start, name =
'fact_thumb.out', stop reason = signal SIGBUS
frame #0: 0xb6fb32a0 fact_thumb.out`_start
fact_thumb.out`_start:
-> 0xb6fb32a0 <+0>: ldr r12, [pc, #0x5c]
0xb6fb32a4 <+4>: push {r11, lr}
0xb6fb32a8 <+8>: ldr r2, [pc, #0x58]
0xb6fb32ac <+12>: add r11, sp, #4</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>