[llvm-bugs] [Bug 27758] New: Broken bitfield debug info in Dwarf4
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon May 16 09:21:14 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27758
Bug ID: 27758
Summary: Broken bitfield debug info in Dwarf4
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: DebugInfo
Assignee: unassignedbugs at nondot.org
Reporter: mattias.v.eriksson at ericsson.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
I am debugging an issue with bitfields and debug info and found that this
commit is where the problems begin.
The file tmp.c:
struct fields
{
unsigned int a : 1;
unsigned int b : 1;
} f;
int main ()
{
f.a = 1;
return 0;
}
Built with top-of-tree clang and run in gdb:
gdb a.out
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
...
Reading symbols from a.out...done.
(gdb) break main
Breakpoint 1 at 0x40058d: file tmp.c, line 9.
(gdb) run
Starting program: a.out
Breakpoint 1, main () at tmp.c:9
9 f.a = 1;
(gdb) display f
1: f = {a = 0, b = 0}
(gdb) n
10 return 0;
1: f = {a = 1, b = 1} <<<--- Unexpected value of b!
(gdb) x &f
0x402024 <f>: 0x00000001
(gdb)
I have identified the first commit where this is broken as this one:
http://reviews.llvm.org/D19630
--
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/20160516/43ddf82d/attachment.html>
More information about the llvm-bugs
mailing list