[lldb-dev] [Bug 25194] New: LLDB-Server Assertion raised when single stepping on MIPS

via lldb-dev lldb-dev at lists.llvm.org
Thu Oct 15 09:31:47 PDT 2015


            Bug ID: 25194
           Summary: LLDB-Server Assertion raised when single stepping on
           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: aidan at codeplay.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

When using LLDB-Server on the Android Mips32 emulator and assertion is raised
when performing a single step.  The sample program attached can be used to
reproduce this problem.

The sample program was compiled using the mips toolchain from the Android NDK,
specificaly: gcc version 4.9 20140827 (prerelease) (GCC).
The binary was compiled at -O0 with debug info.

The test case is as follows:

#include <stdio.h>
#include <unistd.h>

static volatile bool e = true;

int main() {

    printf("hello world!\n");

    while (e) {

    printf( "exiting...\n" );
    return 0;

If I place a breakpoint on line 11 (usleep) and then inside of usleep for 10
instructions or so, the following occurs.

1|root at generic_mips:/data # ./lldb-server-3.8.0-s g *:1234 -- test             
using the default platform: host
Launched 'test' as process 963...
lldb-server-local_buildListening to port 1234 for a connection from *...
Connection established.
assertion "pc_it != baton.m_register_values.end() && "Emulation was successfull
but PC wasn't updated"" failed

>From the perspective of lldb server I see this:

(lldb) s
Process 963 stopped
* thread #1: tid = 963, 0x77d35748, name = 'test', stop reason = instruction
step into
    frame #0: 0x77d35748
->  0x77d35748: addiu  $sp, $sp, -40
    0x77d3574c: addiu  $7, $6, 16960
    0x77d35750: mfhi   $5
    0x77d35754: sw     $ra, 36($sp)
(lldb) s
Process 963 exited with status = -1 (0xffffffff) lost connection

I have seen the same assersion fire up when single stepping in a more
complicated scenario.

My version of LLDB was build from the upstream git mirror from commit:

I have attached the source code for the sample, and a copy of my compiled

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/20151015/58bf7c6e/attachment.html>

More information about the lldb-dev mailing list