Source:
<code>private void setThreadSpecificBreakpoint( final ICBreakpoint plBpt, MIBreakpoint miBpt) { try { IMIProcesses processes = getServicesTracker().getService(IMIProcesses.class); if (processes == null) { return; } String threadId = miBpt.getThreadId(); IContainerDMContext contDMC = processes.createContainerContextFromThreadId(getCommandControl().getContext(), threadId); if (contDMC == null) { return; } IProcessDMContext procDmc = DMContexts.getAncestorOfType(contDMC, IProcessDMContext.class); if (procDmc == null) { return; } IDsfBreakpointExtension bpExtension = (IDsfBreakpointExtension)plBpt.getExtension( MIBreakpointsManager.GDB_DEBUG_MODEL_ID, ICBreakpointExtension.class); IExecutionDMContext[] execDMCs = bpExtension.getThreadFilters(contDMC); if (execDMCs == null) { execDMCs = new IExecutionDMContext[0]; } int threadNum = Integer.parseInt(threadId); for (IExecutionDMContext execDMC : execDMCs) { <START> int ctxThreadId = Integer.parseInt(((IMIExecutionDMContext)execDMC).getThreadId()); <END> if (execDMC instanceof IMIExecutionDMContext && ctxThreadId == threadNum) { return; } } IExecutionDMContext[] newExecDMCs = new IExecutionDMContext[execDMCs.length + 1]; System.arraycopy(execDMCs, 0, newExecDMCs, 0, execDMCs.length); newExecDMCs[execDMCs.length] = processes.createExecutionContext( contDMC, processes.createThreadContext(procDmc, threadId), threadId); bpExtension.setThreadFilters(newExecDMCs); } catch(NumberFormatException e) { GdbPlugin.log(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, "Invalid thread id")); } catch(CoreException e) { GdbPlugin.log(e); } }</code><technical_language>add a try/catch block for String -> int conversion? Put assert in catch, alerted this fails</technical_language>

Target:
private void setThreadSpecificBreakpoint( final ICBreakpoint plBpt, MIBreakpoint miBpt) { try { IMIProcesses processes = getServicesTracker().getService(IMIProcesses.class); if (processes == null) { return; } String threadId = miBpt.getThreadId(); IContainerDMContext contDMC = processes.createContainerContextFromThreadId(getCommandControl().getContext(), threadId); if (contDMC == null) { return; } IProcessDMContext procDmc = DMContexts.getAncestorOfType(contDMC, IProcessDMContext.class); if (procDmc == null) { return; } IDsfBreakpointExtension bpExtension = (IDsfBreakpointExtension)plBpt.getExtension( MIBreakpointsManager.GDB_DEBUG_MODEL_ID, ICBreakpointExtension.class); IExecutionDMContext[] execDMCs = bpExtension.getThreadFilters(contDMC); if (execDMCs == null) { execDMCs = new IExecutionDMContext[0]; } int threadNum = Integer.parseInt(threadId); for (IExecutionDMContext execDMC : execDMCs) { int ctxThreadId = Integer.parseInt(((IMIExecutionDMContext)execDMC).getThreadId()); if (execDMC instanceof IMIExecutionDMContext && ctxThreadId == threadNum) { return; } } IExecutionDMContext[] newExecDMCs = new IExecutionDMContext[execDMCs.length + 1]; System.arraycopy(execDMCs, 0, newExecDMCs, 0, execDMCs.length); newExecDMCs[execDMCs.length] = processes.createExecutionContext( contDMC, processes.createThreadContext(procDmc, threadId), threadId); bpExtension.setThreadFilters(newExecDMCs); } catch(NumberFormatException e) { GdbPlugin.log(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, "Invalid thread id")); assert false : THE_THREAD_ID_DOES_NOT_CONVERT_TO_AN_INTEGER; } catch(CoreException e) { GdbPlugin.log(e); } }