[llvm-bugs] [Bug 32123] New: No debuginfo location for second basic block in the same line

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 2 16:14:41 PST 2017


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

            Bug ID: 32123
           Summary: No debuginfo location for second basic block in the
                    same line
           Product: libraries
           Version: 3.9
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: DebugInfo
          Assignee: unassignedbugs at nondot.org
          Reporter: arielb1 at mail.tau.ac.il
                CC: llvm-bugs at lists.llvm.org

Created attachment 18046
  --> https://bugs.llvm.org/attachment.cgi?id=18046&action=edit
IR with bad codegen

When there are 2 consecutive basic blocks (even if they don't branch to one
another at all) on the same DI code line, no .loc debuginfo is emitted on the
second basic block, so breakpoints into it get missed and step-over jumps over
it

## Meta
$ dpkg -S `which llc-3.9`
llvm-3.9: /usr/bin/llc-3.9
$ dpkg-query -W -f='${Version}\n' llvm-3.9
1:3.9.1-4

## STR & actual result

$ llc-3.9 di.ll -relocation-model=pic
$ gcc di.s
$ gdb ./a.out
...
(gdb) b di.rs:3
Breakpoint 1 at 0x677: file /cache/di.rs, line 3.
(gdb) r
Starting program: /cache/a.out 
[Inferior 1 (process 16580) exited with code 0160]
(gdb) q
; How was my breakpoint skipped?

## Expected Result

Both calls to `bar` are in line 3, and the second call is run, so the
breakpoint should get hit (equivalently, stepping through using `next` should
go through lines 2->3->4).

-- 
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/20170303/eb303bd6/attachment-0001.html>


More information about the llvm-bugs mailing list