Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 269838 | Differences between
and this patch

Collapse All | Expand All

(-)mi/org/eclipse/cdt/debug/mi/core/command/factories/macos/MacOsCLIInfoThreadsInfo.java (-3 / +5 lines)
Lines 52-60 Link Here
52
			threadIds = new int[0];
52
			threadIds = new int[0];
53
		}
53
		}
54
		Arrays.sort(threadIds);
54
		Arrays.sort(threadIds);
55
		if (threadIds.length > 0) {
55
		
56
			currentThreadId = threadIds[0];
56
		// -thread-list-ids doesn't provide the current thread id so we
57
		}
57
		// set currentThreadId to a dumb value. This has the effect of falling
58
		// back to the thread id provided by the stopped event. See EventManager::processSuspendedEvent
59
		currentThreadId = -1;
58
	}
60
	}
59
61
60
	void parseThreadIds(MITuple tuple) {
62
	void parseThreadIds(MITuple tuple) {
(-)cdi/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java (-1 / +17 lines)
Lines 282-287 Link Here
282
		currentTarget.updateState(threadId);
282
		currentTarget.updateState(threadId);
283
		try {
283
		try {
284
			Thread cthread = (Thread)currentTarget.getCurrentThread();
284
			Thread cthread = (Thread)currentTarget.getCurrentThread();
285
			
286
			// As a fallback, use the id from the stopped event
287
			if(cthread == null) {
288
				cthread = (Thread)currentTarget.getThread(threadId);
289
			}
290
			
285
			if (cthread != null) {
291
			if (cthread != null) {
286
				cthread.getCurrentStackFrame();
292
				cthread.getCurrentStackFrame();
287
			} else {
293
			} else {
Lines 422-430 Link Here
422
				Thread currentThread = null;
428
				Thread currentThread = null;
423
				try {
429
				try {
424
					currentThread = (Thread)currentTarget.getCurrentThread();
430
					currentThread = (Thread)currentTarget.getCurrentThread();
431
					// As a fallback, use the id from the stopped event
432
					if(currentThread == null) {
433
						currentThread = (Thread)currentTarget.getThread(stopped.getThreadId());
434
					}
435
					if(currentThread != null) {
436
						tid = currentThread.getId();
437
					}
438
					else {
439
						return true;
440
					}
425
				} catch (CDIException e1) {
441
				} catch (CDIException e1) {
426
				}
442
				}
427
				tid = currentThread.getId();
443
				
428
				// Select the old thread now.
444
				// Select the old thread now.
429
				if (tid > 0) {
445
				if (tid > 0) {
430
					MIThreadSelect selectThread = factory.createMIThreadSelect(tid);
446
					MIThreadSelect selectThread = factory.createMIThreadSelect(tid);

Return to bug 269838