[llvm-bugs] [Bug 36435] New: Unexpected conditional breakpoint hit

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Feb 19 04:43:41 PST 2018


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

            Bug ID: 36435
           Summary: Unexpected conditional breakpoint hit
           Product: lldb
           Version: 6.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: dantipov at nvidia.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 19898
  --> https://bugs.llvm.org/attachment.cgi?id=19898&action=edit
Sample program

In GDB:

$ gdb -q t-thread3
Reading symbols from t-thread3...done.
(gdb) b f if v > 1
Breakpoint 1 at 0x400a4c: file t-thread3.cc, line 14.
(gdb) r
Starting program: /home/dantipov/tmp/t-thread3 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff6edf700 (LWP 16244)]
[New Thread 0x7ffff66de700 (LWP 16245)]
[New Thread 0x7ffff5edd700 (LWP 16246)]
[New Thread 0x7ffff56dc700 (LWP 16247)]
[Switching to Thread 0x7ffff5edd700 (LWP 16246)]

Thread 4 "t-thread3" hit Breakpoint 1, f (v=2) at t-thread3.cc:14
14            g (v);
(gdb) c
Continuing.
[Switching to Thread 0x7ffff56dc700 (LWP 16247)]

Thread 5 "t-thread3" hit Breakpoint 1, f (v=3) at t-thread3.cc:14
14            g (v);
(gdb) c
Continuing.
[Switching to Thread 0x7ffff5edd700 (LWP 16246)]

Thread 4 "t-thread3" hit Breakpoint 1, f (v=2) at t-thread3.cc:14
14            g (v);
(gdb) c
Continuing.
[Switching to Thread 0x7ffff56dc700 (LWP 16247)]

Thread 5 "t-thread3" hit Breakpoint 1, f (v=3) at t-thread3.cc:14
14            g (v);
(gdb) c
Continuing.
[Switching to Thread 0x7ffff5edd700 (LWP 16246)]

Thread 4 "t-thread3" hit Breakpoint 1, f (v=2) at t-thread3.cc:14
14            g (v);
(gdb) c
Continuing.
[Switching to Thread 0x7ffff56dc700 (LWP 16247)]

Thread 5 "t-thread3" hit Breakpoint 1, f (v=3) at t-thread3.cc:14
14            g (v);
(gdb) c
Continuing.
[Switching to Thread 0x7ffff5edd700 (LWP 16246)]

Thread 4 "t-thread3" hit Breakpoint 1, f (v=2) at t-thread3.cc:14
14            g (v);

In LLDB:

$ /home/dantipov/.local/llvm-6.0.0/bin/lldb t-thread3
(lldb) target create "t-thread3"
Current executable set to 't-thread3' (x86_64).
(lldb) breakpoint set -n f -c 'v > 1'
Breakpoint 1: where = t-thread3`f(int) + 11 at t-thread3.cc:14, address =
0x0000000000400a4c
(lldb) run
Process 16274 launched: '/home/dantipov/tmp/t-thread3' (x86_64)
Process 16274 stopped
* thread #2, name = 't-thread3', stop reason = breakpoint 1.1
    frame #0: 0x0000000000400a4c t-thread3`f(v=0) at t-thread3.cc:14
   11   {
   12     while (true)
   13       {
-> 14         g (v);                                                  ;; 0 > 1
?
   15       }
   16   }
   17   
  thread #3, name = 't-thread3', stop reason = breakpoint 1.1
    frame #0: 0x0000000000400a4c t-thread3`f(v=1) at t-thread3.cc:14
   11   {
   12     while (true)
   13       {
-> 14         g (v);                                                  ;; 1 > 1
?
   15       }
   16   }
   17   
  thread #4, name = 't-thread3', stop reason = breakpoint 1.1
    frame #0: 0x0000000000400a4c t-thread3`f(v=2) at t-thread3.cc:14
   11   {
   12     while (true)
   13       {
-> 14         g (v);                                                  ;; OK
   15       }
   16   }
   17   
(lldb) process continue
Process 16274 resuming
Process 16274 stopped
* thread #2, name = 't-thread3', stop reason = breakpoint 1.1
    frame #0: 0x0000000000400a4c t-thread3`f(v=0) at t-thread3.cc:14
   11   {
   12     while (true)
   13       {
-> 14         g (v);                                                  ;; 0 > 1
?
   15       }
   16   }
   17   
  thread #3, name = 't-thread3', stop reason = breakpoint 1.1
    frame #0: 0x0000000000400a4c t-thread3`f(v=1) at t-thread3.cc:14
   11   {
   12     while (true)
   13       {
-> 14         g (v);                                                  ;; 1 > 1
?
   15       }
   16   }
   17   
  thread #4, name = 't-thread3', stop reason = breakpoint 1.1
    frame #0: 0x0000000000400a4c t-thread3`f(v=2) at t-thread3.cc:14
   11   {
   12     while (true)
   13       {
-> 14         g (v);                                                  ;; OK
   15       }
   16   }
   17

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180219/b95a6344/attachment-0001.html>


More information about the llvm-bugs mailing list