diff --git a/share/qtcreator/gdbmacros/dumper.py b/share/qtcreator/gdbmacros/dumper.py
index 021b9bac7c1257c3881631d9fec60d2107f38033..3c1227db575df57401fb906068874dce021dca36 100644
--- a/share/qtcreator/gdbmacros/dumper.py
+++ b/share/qtcreator/gdbmacros/dumper.py
@@ -1472,6 +1472,12 @@ class Dumper:
                 value = item.value
                 type = value.type
 
+        if type.code == gdb.TYPE_CODE_INT or type.code == gdb.TYPE_CODE_CHAR:
+            self.putType(realtype)
+            self.putValue(int(value))
+            self.putNumChild(0)
+            return
+
         typedefStrippedType = stripTypedefs(type)
 
         if isSimpleType(typedefStrippedType):
diff --git a/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp b/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp
index 96d62dbdf066c74b147cc5bbfdb1e87c36a45cb4..81a486f3ce3ba492b7eab7758d4493965f7b4413 100644
--- a/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp
+++ b/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp
@@ -1959,6 +1959,16 @@ void testConditional(const QString &str)
     res += "x";
 }
 
+void testChar()
+{
+    char s[5];
+    s[0] = 0;
+    strcat(s,"\""); // add a quote
+    strcat(s,"\""); // add a quote
+    strcat(s,"\""); // add a quote
+    strcat(s,"\""); // add a quote
+}
+
 void testStuff()
 {
     testConditional("foo");
@@ -2099,6 +2109,7 @@ int main(int argc, char *argv[])
     testColor();
     testQRegion();
     testTypedef();
+    testChar();
     testStuff();
     testPeekAndPoke3();
     testFunctionPointer();