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
Tobias Hunger
qt-creator
Commits
ec9597b1
Commit
ec9597b1
authored
Oct 05, 2009
by
Friedemann Kleint
Browse files
CDB: Restore current thread.
parent
3b17fe8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/cdb/cdbstacktracecontext.cpp
View file @
ec9597b1
...
...
@@ -226,6 +226,8 @@ static inline QString msgGetThreadStateFailed(unsigned long threadId, const QStr
return
QString
::
fromLatin1
(
"Unable to determine the state of thread %1: %2"
).
arg
(
threadId
).
arg
(
why
);
}
// Determine information about thread. This changes the
// current thread to thread->id.
static
inline
bool
getStoppedThreadState
(
const
CdbComInterfaces
&
cif
,
ThreadData
*
t
,
QString
*
errorMessage
)
...
...
@@ -315,6 +317,14 @@ bool CdbStackTraceContext::getThreads(const CdbComInterfaces &cif,
}
threads
->
push_back
(
threadData
);
}
// Restore thread id
if
(
isStopped
&&
threads
->
back
().
id
!=
*
currentThreadId
)
{
hr
=
cif
.
debugSystemObjects
->
SetCurrentThreadId
(
*
currentThreadId
);
if
(
FAILED
(
hr
))
{
*
errorMessage
=
msgGetThreadsFailed
(
msgComFailed
(
"SetCurrentThreadId"
,
hr
));
return
false
;
}
}
return
true
;
}
...
...
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