[PATCH] D19630: Debug info: Support DWARF4 bitfields via DW_AT_data_bit_offset.

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Mon May 16 09:10:58 PDT 2016


Yes please.

Thanks!

-eric

On Mon, May 16, 2016 at 9:06 AM mattias.v.eriksson at ericsson.com <
mattias.v.eriksson at ericsson.com> wrote:

> materi added a subscriber: materi.
> materi added a comment.
>
> Hi!
>
> 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)
>
> Should I write a bug report in bugzilla?
>
>
> Repository:
>   rL LLVM
>
> http://reviews.llvm.org/D19630
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160516/be406106/attachment.html>


More information about the llvm-commits mailing list