1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

let getCThreads() set the currentThreadId.

This commit is contained in:
Alain Magloire 2002-12-02 18:35:11 +00:00
parent c781d1d4a0
commit 40add7d0b2

View file

@ -131,11 +131,15 @@ public class CTarget implements ICDITarget {
*/
void updateState(int newThreadId) {
CThread[] oldThreads = currentThreads;
// If we use "info threads" in getCThreads() this
// will be overwritten. However if we use -stack-list-threads
// it does not provide to the current thread
currentThreadId = newThreadId;
// get the new Threads.
CThread[] newThreads = getCThreads();
currentThreads = newThreads;
currentThreadId = newThreadId;
// Fire destroyedEvent for old threads.
if (oldThreads != null && oldThreads.length > 0) {