aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2018-12-17 12:27:02 +0100
committerhjk <hjk@qt.io>2018-12-17 13:21:02 +0000
commit2a67a86c2ff0f5a33dee133dc45744d1c5a179c3 (patch)
tree330690d39f5307bb51bc50c74509059751b6a1af /tests/auto
parent40f2f9971409acf3e2e531411826a01ed5223561 (diff)
Debugger: Add fallback when gdb.Value.cast() fails for typedefs
Fixes: QTCREATORBUG-18450 Change-Id: I9239beb7e1879a284e28a30579129fe487eb2dd2 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/debugger/tst_dumpers.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp
index c3a33eb1ad8..8f78aa7c47d 100644
--- a/tests/auto/debugger/tst_dumpers.cpp
+++ b/tests/auto/debugger/tst_dumpers.cpp
@@ -5383,6 +5383,23 @@ void tst_Dumpers::dumper_data()
+ Check("s32s", "-2147483648", TypeDef("int", "@qint32"));
+ QTest::newRow("Int128")
+ << Data("#include <limits.h>\n",
+ "using typedef_s128 = __int128_t;\n"
+ "using typedef_u128 = __uint128_t;\n"
+ "__int128_t s128 = 12;\n"
+ "__uint128_t u128 = 12;\n"
+ "typedef_s128 ts128 = 12;\n"
+ "typedef_u128 tu128 = 12;\n"
+ "unused(&u128, &s128, &tu128, &ts128);\n")
+ // Sic! The expected type is what gcc 8.2.0 records.
+ + GdbEngine
+ + Check("s128", "12", "__int128")
+ + Check("u128", "12", "__int128 unsigned")
+ + Check("ts128", "12", "typedef_s128")
+ + Check("tu128", "12", "typedef_u128") ;
+
+
QTest::newRow("Float")
<< Data("#include <QFloat16>\n",
"qfloat16 f1 = 45.3f; unused(&f1);\n"