Debugger: Improve handling of stdint types

* Make (u)intX_t known as integral type
* Handle uint8_t[] the same way as char[] and unsigned char[]

Task-number: QTCREATORBUG-26501
Change-Id: I1eac21be198f8107f088e56daf435b5bb3217120
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Andre Hartmann
2021-10-29 14:11:10 +02:00
committed by André Hartmann
parent 03bcdc9186
commit 78a1beb06e
3 changed files with 18 additions and 5 deletions

View File

@@ -50,7 +50,12 @@ bool isIntType(const QString &type)
case 'c':
return type == "char";
case 'i':
return type == "int";
return type.startsWith("int") &&
( type == "int"
|| type == "int8_t"
|| type == "int16_t"
|| type == "int32_t"
|| type == "int64_t");
case 'l':
return type == "long"
|| type == "long int"
@@ -86,7 +91,12 @@ bool isIntType(const QString &type)
|| type == "unsigned long"
|| type == "unsigned long int"
|| type == "unsigned long long"
|| type == "unsigned long long int"));
|| type == "unsigned long long int"))
|| (type.startsWith("uint") &&
( type == "uint8_t"
|| type == "uint16_t"
|| type == "uint32_t"
|| type == "uint64_t"));
default:
return false;
}