|
Lines 284-290
Link Here
|
| 284 |
private StateChangeReason fStateChangeReason; |
284 |
private StateChangeReason fStateChangeReason; |
| 285 |
private IExecutionDMContext fStateChangeTriggeringContext; |
285 |
private IExecutionDMContext fStateChangeTriggeringContext; |
| 286 |
|
286 |
|
| 287 |
private static final int DEFAULT_THREAD_ID = 1; |
287 |
private static final int FAKE_THREAD_ID = 0; |
| 288 |
|
288 |
|
| 289 |
public MIRunControl(DsfSession session) { |
289 |
public MIRunControl(DsfSession session) { |
| 290 |
super(session); |
290 |
super(session); |
|
Lines 626-634
Link Here
|
| 626 |
|
626 |
|
| 627 |
private IExecutionDMContext[] makeExecutionDMCs(IContainerDMContext containerCtx, MIThreadListIdsInfo info) { |
627 |
private IExecutionDMContext[] makeExecutionDMCs(IContainerDMContext containerCtx, MIThreadListIdsInfo info) { |
| 628 |
if (info.getThreadIds().length == 0) { |
628 |
if (info.getThreadIds().length == 0) { |
| 629 |
//Main thread always exist even if it is not reported by GDB. |
629 |
// Main thread always exist even if it is not reported by GDB. |
| 630 |
//So create thread-id= 0 when no thread is reported |
630 |
// So create thread-id = 0 when no thread is reported. |
| 631 |
return new IMIExecutionDMContext[]{new MIExecutionDMC(getSession().getId(), containerCtx, DEFAULT_THREAD_ID)}; |
631 |
// This hack is necessary to prevent AbstractMIControl from issuing a thread-select |
|
|
632 |
// because it doesn't work if the application was not compiled with pthread. |
| 633 |
return new IMIExecutionDMContext[]{new MIExecutionDMC(getSession().getId(), containerCtx, FAKE_THREAD_ID)}; |
| 632 |
} else { |
634 |
} else { |
| 633 |
IExecutionDMContext[] executionDmcs = new IMIExecutionDMContext[info.getThreadIds().length]; |
635 |
IExecutionDMContext[] executionDmcs = new IMIExecutionDMContext[info.getThreadIds().length]; |
| 634 |
for (int i = 0; i < info.getThreadIds().length; i++) { |
636 |
for (int i = 0; i < info.getThreadIds().length; i++) { |