[lldb-dev] [Bug 17096] New: Incorrect stop reason data for multiple breakpoints

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Sep 4 05:38:02 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=17096

            Bug ID: 17096
           Summary: Incorrect stop reason data for multiple breakpoints
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at cs.uiuc.edu
          Reporter: jonas.wagner at epfl.ch
    Classification: Unclassified

SBThread.GetStopReasonDataAtIndex() seems to return the wrong data. Consider
the following session:

jowagner at dslabpc6:/tmp$ cat simple.c 
#include <stdio.h>

int main() {
    printf("Hello, world!\n");
    return 0;
}
jowagner at dslabpc6:/tmp$ gcc -Wall -g -o simple simple.c 
jowagner at dslabpc6:/tmp$ ./simple 
Hello, world!
jowagner at dslabpc6:/tmp$ lldb-3.4 ./simple
Current executable set to './simple' (x86_64).
(lldb) breakpoint set -n main
Breakpoint 1: where = simple`main + 4 at simple.c:4, address =
0x0000000000400590
(lldb) breakpoint set -n main
Breakpoint 2: where = simple`main + 4 at simple.c:4, address =
0x0000000000400590
(lldb) run
Process 5262 launched: './simple' (x86_64)
Process 5262 stopped
* thread #1: tid = 5262, 0x0000000000400590 simple`main + 4 at simple.c:4, name
= 'simple', stop reason = breakpoint 1.1 2.1
    frame #0: 0x0000000000400590 simple`main + 4 at simple.c:4
   1       #include <stdio.h>
   2       
   3       int main() {
-> 4           printf("Hello, world!\n");
   5           return 0;
   6       }
(lldb) script
Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.
>>> lldb.thread.GetStopReasonDataCount()
4L
>>> lldb.thread.GetStopReasonDataAtIndex(0)
1L
>>> lldb.thread.GetStopReasonDataAtIndex(1)
1L
>>> lldb.thread.GetStopReasonDataAtIndex(2)
1L
>>> lldb.thread.GetStopReasonDataAtIndex(3)
1L
>>> lldb.thread.GetStopReasonDataAtIndex(4)
0L

One can see that the stop reason is displayed correctly in the thread listing,
but that GetStopReasonDataAtIndex(2) returns the wrong value.

-- 
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/20130904/39a897b6/attachment.html>


More information about the lldb-dev mailing list