Skip to content
GitLab
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
ad8eec7e
Commit
ad8eec7e
authored
Apr 06, 2009
by
hjk
Browse files
debugger: escape '"' in GdbMi::toString()
Fixes an autotest failure.
parent
c1124a4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/gdbmi.cpp
View file @
ad8eec7e
...
...
@@ -211,6 +211,12 @@ void GdbMi::dumpChildren(QByteArray * str, bool multiline, int indent) const
}
}
static
QByteArray
escaped
(
QByteArray
ba
)
{
ba
.
replace
(
"
\"
"
,
"
\\\"
"
);
return
ba
;
}
QByteArray
GdbMi
::
toString
(
bool
multiline
,
int
indent
)
const
{
QByteArray
result
;
...
...
@@ -221,13 +227,10 @@ QByteArray GdbMi::toString(bool multiline, int indent) const
else
result
+=
"Invalid"
;
break
;
case
Const
:
case
Const
:
if
(
!
m_name
.
isEmpty
())
result
+=
m_name
+
"="
;
if
(
multiline
)
result
+=
"
\"
"
+
m_data
+
"
\"
"
;
else
result
+=
"
\"
"
+
m_data
+
"
\"
"
;
result
+=
"
\"
"
+
escaped
(
m_data
)
+
"
\"
"
;
break
;
case
Tuple
:
if
(
!
m_name
.
isEmpty
())
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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