[lldb-dev] [Bug 26632] New: Breakpoint opcode triggering SIGBUS on Nexus 6

via lldb-dev lldb-dev at lists.llvm.org
Tue Feb 16 04:50:43 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26632

            Bug ID: 26632
           Summary: Breakpoint opcode triggering SIGBUS on Nexus 6
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: ewan at codeplay.com
                CC: llvm-bugs at lists.llvm.org, tberghammer at google.com
    Classification: Unclassified

Created attachment 15910
  --> https://llvm.org/bugs/attachment.cgi?id=15910&action=edit
Source and arm binaries

r260367(http://reviews.llvm.org/D16853) 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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160216/87c40eed/attachment-0001.html>


More information about the lldb-dev mailing list