[lldb-dev] [Bug 48381] New: lldb not stopped at an executed return statement

via lldb-dev lldb-dev at lists.llvm.org
Thu Dec 3 17:27:46 PST 2020


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

            Bug ID: 48381
           Summary: lldb not stopped at an executed return statement
           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: yangyibiao at nju.edu.cn
                CC: jdevlieghere at apple.com, llvm-bugs at lists.llvm.org

Created attachment 24232
  --> https://bugs.llvm.org/attachment.cgi?id=24232&action=edit
the binary 'a.out'

$ clang -O1 -g small.c


$ lldb a.out
(lldb) target create "a.out"
Current executable set to '/root/DeVIL/a.out' (x86_64).
(lldb) b main
Breakpoint 1: where = a.out`main at small.c:14:10, address = 0x00000000004004a0
(lldb) run
-> 14     for (; d < 1; d++)

(lldb) step
-> 15       for (; b < 1; b++)
(lldb) step
-> 16         *c[b][d + 1] = 0;
(lldb) step
-> 15       for (; b < 1; b++)
(lldb) step
-> 14     for (; d < 1; d++)
(lldb) step
-> 18     return 0;
(lldb)



$ lldb a.out
(lldb) target create "a.out"
Current executable set to '/root/DeVIL/a.out' (x86_64).
(lldb) b 18
Breakpoint 1: where = a.out`main + 10 at small.c:18:3, address =
0x00000000004004aa
(lldb) run
Process 27027 launched: '/root/DeVIL/a.out' (x86_64)
Process 27027 exited with status = 0 (0x00000000)
(lldb)



$ cat small.c
struct S
{
  volatile int f;
} a;

unsigned int b;

static int *c[1][2] = {{0, (int *)&a.f}};
static unsigned int d;

int
main ()
{
  for (; d < 1; d++)
    for (; b < 1; b++)
      *c[b][d + 1] = 0;

  return 0;
}

-- 
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/20201204/ddcecffa/attachment.html>


More information about the lldb-dev mailing list