[lldb-dev] TestBitfields

Filipe Cabecinhas filcab+lldb-dev at gmail.com
Thu Jan 3 15:38:05 PST 2013


Hi all,

TestBitfields is failing for some time. It seems to be relying on the value
of undefined bits:

self.expect("frame variable --show-types more_bits",
VARIABLES_DISPLAYED_CORRECTLY,
    substrs = ['(uint32_t:3) a = 3',
               '(int:1)  = 0',
               '(uint8_t:1) b = \'\\0\'',
               '(uint8_t:1) c = \'\\x01\'',
               '(uint8_t:1) d = \'\\0\''])

This always fails for me, at TestBitfields.py line 106.
It seems to be relying on the value (and type) of the padding bit.

I suppose we don't get the type we expected (for the padding bit) because
clang may be throwing it out (we can't reference it) But our test is
relying on both the type AND the value of the padding bit.

Maybe I misunderstood something, but attached is a patch, in case my
analysis is correct.

Regards,

  Filipe

P.S: This happens on i386 only (tested on Mac OS X).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130103/7678c233/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestBitfields-fix.patch
Type: application/octet-stream
Size: 605 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130103/7678c233/attachment.obj>


More information about the lldb-dev mailing list