|
Lines 88-93
Link Here
|
| 88 |
import org.eclipse.cdt.debug.mi.core.command.MIExecUntil; |
88 |
import org.eclipse.cdt.debug.mi.core.command.MIExecUntil; |
| 89 |
import org.eclipse.cdt.debug.mi.core.command.MIGDBShowEndian; |
89 |
import org.eclipse.cdt.debug.mi.core.command.MIGDBShowEndian; |
| 90 |
import org.eclipse.cdt.debug.mi.core.command.MITargetDetach; |
90 |
import org.eclipse.cdt.debug.mi.core.command.MITargetDetach; |
|
|
91 |
import org.eclipse.cdt.debug.mi.core.command.MIThreadListIds; |
| 91 |
import org.eclipse.cdt.debug.mi.core.command.MIThreadSelect; |
92 |
import org.eclipse.cdt.debug.mi.core.command.MIThreadSelect; |
| 92 |
import org.eclipse.cdt.debug.mi.core.event.MIDetachedEvent; |
93 |
import org.eclipse.cdt.debug.mi.core.event.MIDetachedEvent; |
| 93 |
import org.eclipse.cdt.debug.mi.core.event.MIThreadCreatedEvent; |
94 |
import org.eclipse.cdt.debug.mi.core.event.MIThreadCreatedEvent; |
|
Lines 98-103
Link Here
|
| 98 |
import org.eclipse.cdt.debug.mi.core.output.MIFrame; |
99 |
import org.eclipse.cdt.debug.mi.core.output.MIFrame; |
| 99 |
import org.eclipse.cdt.debug.mi.core.output.MIGDBShowEndianInfo; |
100 |
import org.eclipse.cdt.debug.mi.core.output.MIGDBShowEndianInfo; |
| 100 |
import org.eclipse.cdt.debug.mi.core.output.MIInfo; |
101 |
import org.eclipse.cdt.debug.mi.core.output.MIInfo; |
|
|
102 |
import org.eclipse.cdt.debug.mi.core.output.MIThreadListIdsInfo; |
| 101 |
import org.eclipse.cdt.debug.mi.core.output.MIThreadSelectInfo; |
103 |
import org.eclipse.cdt.debug.mi.core.output.MIThreadSelectInfo; |
| 102 |
|
104 |
|
| 103 |
/** |
105 |
/** |
|
Lines 331-353
Link Here
|
| 331 |
rxThread.setEnableConsole(false); |
333 |
rxThread.setEnableConsole(false); |
| 332 |
try { |
334 |
try { |
| 333 |
CommandFactory factory = miSession.getCommandFactory(); |
335 |
CommandFactory factory = miSession.getCommandFactory(); |
| 334 |
CLIInfoThreads tids = factory.createCLIInfoThreads(); |
336 |
CLIInfoThreads cliInfoThreads = factory.createCLIInfoThreads(); |
| 335 |
// HACK/FIXME: gdb/mi thread-list-ids does not |
337 |
miSession.postCommand(cliInfoThreads); |
| 336 |
// show any newly create thread, we workaround by |
338 |
CLIInfoThreadsInfo infoThreads = cliInfoThreads.getMIInfoThreadsInfo(); |
| 337 |
// issuing "info threads" instead. |
339 |
MIThreadListIds tids = factory.createMIThreadListIds(); |
| 338 |
// MIThreadListIds tids = factory.createMIThreadListIds(); |
340 |
miSession.postCommand(tids); |
| 339 |
// MIThreadListIdsInfo info = tids.getMIThreadListIdsInfo(); |
341 |
MIThreadListIdsInfo infoTids = tids.getMIThreadListIdsInfo(); |
| 340 |
miSession.postCommand(tids); |
|
|
| 341 |
CLIInfoThreadsInfo info = tids.getMIInfoThreadsInfo(); |
| 342 |
int[] ids; |
342 |
int[] ids; |
| 343 |
String[] names; |
343 |
String[] names; |
| 344 |
if (info == null) { |
344 |
if (infoTids == null) { |
| 345 |
ids = new int[0]; |
345 |
ids = new int[0]; |
| 346 |
names = new String[0]; |
346 |
names = new String[0]; |
| 347 |
} else { |
347 |
} else { |
| 348 |
ids = info.getThreadIds(); |
348 |
ids = infoTids.getThreadIds(); |
| 349 |
names = info.getThreadNames(); |
349 |
names = infoThreads.getThreadNames(); |
| 350 |
currentThreadId = info.getCurrentThread(); |
350 |
currentThreadId = infoThreads.getCurrentThread(); |
| 351 |
} |
351 |
} |
| 352 |
if (ids != null && ids.length > 0) { |
352 |
if (ids != null && ids.length > 0) { |
| 353 |
cthreads = new Thread[ids.length]; |
353 |
cthreads = new Thread[ids.length]; |