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
bf280e21
Commit
bf280e21
authored
Nov 02, 2009
by
Oswald Buddenhagen
Browse files
synchronize temporary interruption with running-requests
Reviewed-by: hjk
parent
e60a7bc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/gdb/gdbengine.cpp
View file @
bf280e21
...
...
@@ -730,9 +730,15 @@ void GdbEngine::postCommandHelper(const GdbCommand &cmd)
// Queue the commands that we cannot send at once.
debugMessage
(
_
(
"QUEUING COMMAND "
)
+
cmd
.
command
);
m_commandsToRunOnTemporaryBreak
.
append
(
cmd
);
if
(
state
()
!=
InferiorStopping
)
{
if
(
state
()
==
InferiorStopping
)
{
debugMessage
(
_
(
"CHILD ALREADY BEING INTERRUPTED"
));
}
else
if
(
state
()
==
InferiorRunningRequested
)
{
debugMessage
(
_
(
"RUNNING REQUESTED; POSTPONING INTERRUPT"
));
}
else
if
(
state
()
==
InferiorRunning
)
{
showStatusMessage
(
tr
(
"Stopping temporarily."
),
1000
);
interruptInferior
();
// FIXME: race condition between gdb and kill()
interruptInferior
();
}
else
{
qDebug
()
<<
"ATTEMPTING TO QUEUE COMMAND IN INAPPROPRIATE STATE"
<<
state
();
}
}
}
else
if
(
!
cmd
.
command
.
isEmpty
())
{
...
...
@@ -866,6 +872,13 @@ void GdbEngine::handleResultRecord(GdbResponse *response)
<<
"LEAVES PENDING AT"
<<
m_pendingRequests
);
}
// Commands were queued, but we were in RunningRequested state, so the interrupt
// was postponed.
// This is done after the command callbacks so the running-requesting commands
// can assert on the right state.
if
(
state
()
==
InferiorRunning
&&
!
m_commandsToRunOnTemporaryBreak
.
isEmpty
())
interruptInferior
();
// Continue only if there are no commands wire anymore, so this will
// be fully synchroneous.
// This is somewhat inefficient, as it makes the last command synchronous.
...
...
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