Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
db753cd8
Commit
db753cd8
authored
Mar 29, 2010
by
hjk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugger: avoid confusing status message when exiting debugging if the the
binary is already gone.
parent
0b12111d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
src/plugins/debugger/gdb/gdbengine.cpp
src/plugins/debugger/gdb/gdbengine.cpp
+17
-5
No files found.
src/plugins/debugger/gdb/gdbengine.cpp
View file @
db753cd8
...
...
@@ -615,8 +615,11 @@ void GdbEngine::handleResponse(const QByteArray &buff)
void
GdbEngine
::
readGdbStandardError
()
{
QByteArray
err
=
m_gdbProc
.
readAllStandardError
();
debugMessage
(
_
(
"UNEXPECTED GDB STDERR: "
+
err
));
if
(
err
==
"Undefined command:
\"
bb
\"
. Try
\"
help
\"
.
\n
"
)
return
;
if
(
err
.
startsWith
(
"BFD: reopening"
))
return
;
qWarning
()
<<
"Unexpected gdb stderr:"
<<
err
;
}
...
...
@@ -1651,11 +1654,20 @@ void GdbEngine::handleInferiorShutdown(const GdbResponse &response)
debugMessage
(
_
(
"INFERIOR SUCCESSFULLY SHUT DOWN"
));
setState
(
InferiorShutDown
);
}
else
{
debugMessage
(
_
(
"INFERIOR SHUTDOWN FAILED"
));
setState
(
InferiorShutdownFailed
);
QString
msg
=
m_gdbAdapter
->
msgInferiorStopFailed
(
QString
::
fromLocal8Bit
(
response
.
data
.
findChild
(
"msg"
).
data
()));
showMessageBox
(
QMessageBox
::
Critical
,
tr
(
"Failed to shut down application"
),
msg
);
QByteArray
ba
=
response
.
data
.
findChild
(
"msg"
).
data
();
if
(
ba
.
contains
(
": No such file or directory."
))
{
// This happens when someone removed the binary behind our back.
// It is not really an error from a user's point of view.
debugMessage
(
_
(
"INFERIOR SUCCESSFULLY SHUT DOWN"
));
debugMessage
(
_
(
"NOTE: "
+
ba
));
setState
(
InferiorShutDown
);
}
else
{
debugMessage
(
_
(
"INFERIOR SHUTDOWN FAILED"
));
setState
(
InferiorShutdownFailed
);
showMessageBox
(
QMessageBox
::
Critical
,
tr
(
"Failed to shut down application"
),
m_gdbAdapter
->
msgInferiorStopFailed
(
QString
::
fromLocal8Bit
(
ba
)));
}
}
shutdown
();
// re-iterate...
}
...
...
Write
Preview
Markdown
is supported
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