Commit f9c58528 authored by hjk's avatar hjk
Browse files

debugger: fix display of '"' chars

Task-number: QTCREATORBUG-3084
parent cb4e6804
...@@ -1472,6 +1472,12 @@ class Dumper: ...@@ -1472,6 +1472,12 @@ class Dumper:
value = item.value value = item.value
type = value.type 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) typedefStrippedType = stripTypedefs(type)
if isSimpleType(typedefStrippedType): if isSimpleType(typedefStrippedType):
......
...@@ -1959,6 +1959,16 @@ void testConditional(const QString &str) ...@@ -1959,6 +1959,16 @@ void testConditional(const QString &str)
res += "x"; 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() void testStuff()
{ {
testConditional("foo"); testConditional("foo");
...@@ -2099,6 +2109,7 @@ int main(int argc, char *argv[]) ...@@ -2099,6 +2109,7 @@ int main(int argc, char *argv[])
testColor(); testColor();
testQRegion(); testQRegion();
testTypedef(); testTypedef();
testChar();
testStuff(); testStuff();
testPeekAndPoke3(); testPeekAndPoke3();
testFunctionPointer(); testFunctionPointer();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment