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
e2d46831
Commit
e2d46831
authored
Nov 02, 2009
by
Oswald Buddenhagen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flush queued commands on non-fatal continuation failures
Reviewed-By: hjk
parent
bf280e21
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
+16
-7
src/plugins/debugger/gdb/gdbengine.cpp
src/plugins/debugger/gdb/gdbengine.cpp
+15
-7
src/plugins/debugger/gdb/gdbengine.h
src/plugins/debugger/gdb/gdbengine.h
+1
-0
No files found.
src/plugins/debugger/gdb/gdbengine.cpp
View file @
e2d46831
...
...
@@ -746,6 +746,17 @@ void GdbEngine::postCommandHelper(const GdbCommand &cmd)
}
}
void
GdbEngine
::
flushQueuedCommands
()
{
showStatusMessage
(
tr
(
"Processing queued commands."
),
1000
);
while
(
!
m_commandsToRunOnTemporaryBreak
.
isEmpty
())
{
GdbCommand
cmd
=
m_commandsToRunOnTemporaryBreak
.
takeFirst
();
debugMessage
(
_
(
"RUNNING QUEUED COMMAND %1 %2"
)
.
arg
(
cmd
.
command
).
arg
(
_
(
cmd
.
callbackName
)));
flushCommand
(
cmd
);
}
}
void
GdbEngine
::
flushCommand
(
const
GdbCommand
&
cmd0
)
{
GdbCommand
cmd
=
cmd0
;
...
...
@@ -1066,13 +1077,7 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
if
(
!
m_commandsToRunOnTemporaryBreak
.
isEmpty
())
{
QTC_ASSERT
(
state
()
==
InferiorStopping
,
qDebug
()
<<
state
())
setState
(
InferiorStopped
);
showStatusMessage
(
tr
(
"Processing queued commands."
),
1000
);
while
(
!
m_commandsToRunOnTemporaryBreak
.
isEmpty
())
{
GdbCommand
cmd
=
m_commandsToRunOnTemporaryBreak
.
takeFirst
();
debugMessage
(
_
(
"RUNNING QUEUED COMMAND %1 %2"
)
.
arg
(
cmd
.
command
).
arg
(
_
(
cmd
.
callbackName
)));
flushCommand
(
cmd
);
}
flushQueuedCommands
();
QTC_ASSERT
(
m_commandsDoneCallback
==
0
,
/**/
);
m_commandsDoneCallback
=
&
GdbEngine
::
autoContinueInferior
;
return
;
...
...
@@ -1319,6 +1324,8 @@ void GdbEngine::handleExecContinue(const GdbResponse &response)
setState
(
InferiorStopped
);
QByteArray
msg
=
response
.
data
.
findChild
(
"msg"
).
data
();
if
(
msg
.
startsWith
(
"Cannot find bounds of current function"
))
{
if
(
!
m_commandsToRunOnTemporaryBreak
.
isEmpty
())
flushQueuedCommands
();
showStatusMessage
(
tr
(
"Stopped."
),
5000
);
//showStatusMessage(tr("No debug information available. "
// "Leaving function..."));
...
...
@@ -1326,6 +1333,7 @@ void GdbEngine::handleExecContinue(const GdbResponse &response)
}
else
{
showMessageBox
(
QMessageBox
::
Critical
,
tr
(
"Execution Error"
),
tr
(
"Cannot continue debugged process:
\n
"
)
+
QString
::
fromLocal8Bit
(
msg
));
m_commandsToRunOnTemporaryBreak
.
clear
();
shutdown
();
}
}
...
...
src/plugins/debugger/gdb/gdbengine.h
View file @
e2d46831
...
...
@@ -226,6 +226,7 @@ private: ////////// Gdb Command Management //////////
const
char
*
callbackName
,
const
QVariant
&
cookie
=
QVariant
());
void
postCommandHelper
(
const
GdbCommand
&
cmd
);
void
flushQueuedCommands
();
void
setTokenBarrier
();
QHash
<
int
,
GdbCommand
>
m_cookieForToken
;
...
...
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