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 369168
Collapse All | Expand All

(-)a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIThread.java (+8 lines)
Lines 124-129 Link Here
124
    private static Pattern fgOsIdPattern1 = Pattern.compile("([Tt][Hh][Rr][Ee][Aa][Dd]\\s*)(0x[0-9a-fA-F]+|-?\\d+)(\\s*\\([Ll][Ww][Pp]\\s*)(\\d*)", 0); //$NON-NLS-1$
124
    private static Pattern fgOsIdPattern1 = Pattern.compile("([Tt][Hh][Rr][Ee][Aa][Dd]\\s*)(0x[0-9a-fA-F]+|-?\\d+)(\\s*\\([Ll][Ww][Pp]\\s*)(\\d*)", 0); //$NON-NLS-1$
125
    private static Pattern fgOsIdPattern2 = Pattern.compile("[Tt][Hh][Rr][Ee][Aa][Dd]\\s*\\d+\\.(\\d+)", 0); //$NON-NLS-1$
125
    private static Pattern fgOsIdPattern2 = Pattern.compile("[Tt][Hh][Rr][Ee][Aa][Dd]\\s*\\d+\\.(\\d+)", 0); //$NON-NLS-1$
126
    private static Pattern fgOsIdPattern3 = Pattern.compile("[Tt][Hh][Rr][Ee][Aa][Dd]\\s*(\\S+)", 0); //$NON-NLS-1$
126
    private static Pattern fgOsIdPattern3 = Pattern.compile("[Tt][Hh][Rr][Ee][Aa][Dd]\\s*(\\S+)", 0); //$NON-NLS-1$
127
    private static Pattern fgOsIdPattern4 = Pattern.compile("[Pp][Rr][Oo][Cc][Ee][Ss][Ss]\\s*(\\S+)", 0); //$NON-NLS-1$
127
128
128
    static String parseOsId(String str) {
129
    static String parseOsId(String str) {
129
        // General format:
130
        // General format:
Lines 132-137 Link Here
132
        //      "Thread 162.32942"
133
        //      "Thread 162.32942"
133
    	//                  ^^^^^
134
    	//                  ^^^^^
134
        //      "thread abc123"
135
        //      "thread abc123"
136
    	//
137
    	//      "process 12345"    => Linux without pthread.  The process as one thread, the process thread.
135
    	//              ^^^^^^
138
    	//              ^^^^^^
136
    	// PLEASE UPDATE MIThreadTests.java IF YOU TWEAK THIS CODE
139
    	// PLEASE UPDATE MIThreadTests.java IF YOU TWEAK THIS CODE
137
140
Lines 150-155 Link Here
150
        	return matcher.group(1);
153
        	return matcher.group(1);
151
        }
154
        }
152
155
156
        matcher = fgOsIdPattern4.matcher(str);
157
        if (matcher.find()) {
158
        	return matcher.group(1);
159
        }
160
153
        return null;
161
        return null;
154
    }
162
    }
155
    
163
    

Return to bug 369168