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
78a560a6
Commit
78a560a6
authored
Nov 16, 2010
by
Friedemann Kleint
Browse files
Debugger: Stop in case of gdb crash in InferiorStop.
Reviewed-by: hjk Task-number: QTCREATORBUG-3099
parent
62285b48
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/gdb/gdbengine.cpp
View file @
78a560a6
...
...
@@ -4300,6 +4300,9 @@ void GdbEngine::handleGdbError(QProcess::ProcessError error)
void
GdbEngine
::
handleGdbFinished
(
int
code
,
QProcess
::
ExitStatus
type
)
{
if
(
m_commandTimer
&&
m_commandTimer
->
isActive
())
m_commandTimer
->
stop
();
//qDebug() << "GDB PROCESS FINISHED";
showMessage
(
_
(
"GDB PROCESS FINISHED, status %1, code %2"
).
arg
(
type
).
arg
(
code
));
/*
...
...
@@ -4314,20 +4317,25 @@ void GdbEngine::handleGdbFinished(int code, QProcess::ExitStatus type)
}
initializeVariables();
*/
if
(
state
()
==
EngineShutdownRequested
)
{
switch
(
state
())
{
case
EngineShutdownRequested
:
notifyEngineShutdownOk
();
}
else
if
(
state
()
==
InferiorRunOk
)
{
break
;
case
InferiorRunOk
:
// This could either be a real gdb crash or a quickly exited inferior
// in the terminal adapter. In this case the stub proc will die soon,
// too, so there's no need to act here.
showMessage
(
_
(
"The gdb process exited somewhat unexpectedly."
));
notifyEngineSpontaneousShutdown
();
}
else
{
QString
msg
=
tr
(
"The gdb process exited unexpectedly (%1)."
)
.
arg
((
type
==
QProcess
::
CrashExit
)
?
tr
(
"crashed"
)
:
tr
(
"code %1"
).
arg
(
code
));
break
;
default:
{
notifyEngineIll
();
// Initiate shutdown sequence
const
QString
msg
=
type
==
QProcess
::
CrashExit
?
tr
(
"The gdb process crashed."
)
:
tr
(
"The gdb process exited unexpectedly (code %1)"
).
arg
(
code
);
showMessageBox
(
QMessageBox
::
Critical
,
tr
(
"Unexpected Gdb Exit"
),
msg
);
notifyEngineSpontaneousShutdown
();
}
break
;
}
}
...
...
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