diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2018-11-01 15:24:17 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2018-11-08 15:12:10 +0000 |
commit | de32a631c3b80bb8d444e7c505eb7dc1a909a5af (patch) | |
tree | bebd7aae4051958f10cde76cef28a0695df58e78 /tests/auto | |
parent | 9b1e7e440a217f70d2cbd6df3582efcfc3e4d341 (diff) |
[Debugger] Fix bitfield values to show up correctly using lldbengine
The bitpos value returned by lldb is the bit offset relative to the
beginning of the type, there is no need to do an extra modulus
operation.
Adjust dumper test to add the previously failing case.
The failing case happens when the class containing the bitfield has
more members in front of the bitfield.
Change-Id: I93678f78e6799843558ec53342a0ed49cac74f48
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/debugger/tst_dumpers.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index ea90617b02c..b3754c90e54 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -5520,7 +5520,9 @@ void tst_Dumpers::dumper_data() "enum E { V1, V2 };" "struct S\n" "{\n" - " S() : x(2), y(3), z(39), e(V2), c(1), b(0), f(5), d(6), i(7) {}\n" + " S() : front(13), x(2), y(3), z(39), e(V2), c(1), b(0), f(5)," + " d(6), i(7) {}\n" + " unsigned int front;\n" " unsigned int x : 3;\n" " unsigned int y : 4;\n" " unsigned int z : 18;\n" @@ -5547,6 +5549,7 @@ void tst_Dumpers::dumper_data() + Check("s.x", "2", "unsigned int") % CdbEngine + Check("s.y", "3", "unsigned int") % CdbEngine + Check("s.z", "39", "unsigned int") % CdbEngine + + Check("s.front", "13", "unsigned int") + Check("s.e", "V2 (1)", TypePattern("main::[a-zA-Z0-9_]*::E")) % CdbEngine; |