1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

[304754] MIThreadCreatedEvent not being generated in a cygwin/mingw debug session

This commit is contained in:
John Cortell 2010-03-04 22:41:07 +00:00
parent a8b9452abb
commit 62117fa551

View file

@ -111,8 +111,13 @@ public class CLIEventProcessor
// Process Events of type DsfMIConsoleStreamOutput here
MIConsoleStreamOutput exec = (MIConsoleStreamOutput) oobr;
// Look for events with Pattern ^[New Thread 1077300144 (LWP 7973)
Pattern pattern = Pattern.compile("(^\\[New Thread.*LWP\\s*)(\\d*)", Pattern.MULTILINE); //$NON-NLS-1$
// Look for events that indicate a new thread:
// Examples:
// [New Thread 1077300144 (LWP 7973) // POSIX
// [New thread 4092.0x8c4] // cygwin and mingw
// Since we currently don't use any of the information in the
// message, we'll use a simple regex pattern
Pattern pattern = Pattern.compile("^\\[New [Tt]hread\\s+"); //$NON-NLS-1$
Matcher matcher = pattern.matcher(exec.getCString());
if (matcher.find()) {
String threadId = Integer.toString(++fLastThreadId);