Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
2dac5e64
Commit
2dac5e64
authored
Jan 28, 2009
by
hjk
Browse files
Fixes: debugger: display quotes around strings in locals view
parent
0ac615a1
Changes
2
Hide whitespace changes
Inline
Side-by-side
share/qtcreator/gdbmacros/gdbmacros.cpp
View file @
2dac5e64
...
...
@@ -555,7 +555,7 @@ void QDumper::addCommaIfNeeded()
put
(
','
);
}
void
QDumper
::
putBase64Encoded
(
const
char
*
buf
,
int
n
)
void
QDumper
::
putBase64Encoded
(
const
char
*
buf
,
int
n
,
char
delim
)
{
const
char
alphabet
[]
=
"ABCDEFGH"
"IJKLMNOP"
"QRSTUVWX"
"YZabcdef"
"ghijklmn"
"opqrstuv"
"wxyz0123"
"456789+/"
;
...
...
src/plugins/debugger/gdbengine.cpp
View file @
2dac5e64
...
...
@@ -2761,14 +2761,17 @@ static void setWatchDataValue(WatchData &data, const GdbMi &mi,
break
;
case
1
:
// base64 encoded 8 bit data
ba
=
QByteArray
::
fromBase64
(
mi
.
data
());
ba
=
'"'
+
ba
+
'"'
;
break
;
case
2
:
// base64 encoded 16 bit data
ba
=
QByteArray
::
fromBase64
(
mi
.
data
());
ba
=
QString
::
fromUtf16
((
ushort
*
)
ba
.
data
(),
ba
.
size
()
/
2
).
toUtf8
();
ba
=
'"'
+
ba
+
'"'
;
break
;
case
3
:
// base64 encoded 32 bit data
ba
=
QByteArray
::
fromBase64
(
mi
.
data
());
ba
=
QString
::
fromUcs4
((
uint
*
)
ba
.
data
(),
ba
.
size
()
/
4
).
toUtf8
();
ba
=
'"'
+
ba
+
'"'
;
break
;
}
data
.
setValue
(
ba
);
...
...
@@ -3550,14 +3553,10 @@ void GdbEngine::handleDumpCustomValue2(const GdbResultRecord &record,
data1
.
iname
=
data
.
iname
+
"."
+
data1
.
name
;
if
(
!
data1
.
name
.
isEmpty
()
&&
data1
.
name
.
at
(
0
).
isDigit
())
data1
.
name
=
'['
+
data1
.
name
+
']'
;
//qDebug() << "NAMEENCODED: " << item.findChild("nameencoded").data()
// << item.findChild("nameencoded").data()[1];
if
(
item
.
findChild
(
"nameencoded"
).
data
()[
0
]
==
'1'
)
data1
.
name
=
QByteArray
::
fromBase64
(
data1
.
name
.
toUtf8
());
QString
key
=
item
.
findChild
(
"key"
).
data
();
if
(
!
key
.
isEmpty
())
{
if
(
item
.
findChild
(
"keyencoded"
).
data
()[
0
]
==
'1'
)
key
=
QByteArray
::
fromBase64
(
key
.
toUtf8
());
key
=
'"'
+
QByteArray
::
fromBase64
(
key
.
toUtf8
())
+
'"'
;
data1
.
name
+=
" ("
+
key
+
")"
;
}
setWatchDataType
(
data1
,
item
.
findChild
(
"type"
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment