mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-20 07:25:23 +02:00
More implementation.
This commit is contained in:
parent
46acfebc85
commit
e9aa009b65
1 changed files with 21 additions and 8 deletions
|
@ -6,8 +6,13 @@
|
||||||
|
|
||||||
package org.eclipse.cdt.debug.core;
|
package org.eclipse.cdt.debug.core;
|
||||||
|
|
||||||
|
import java.text.MessageFormat;
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||||
|
import org.eclipse.cdt.debug.core.cdi.ICDIBreakpoint;
|
||||||
|
import org.eclipse.cdt.debug.core.cdi.ICDILocation;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
||||||
|
import org.eclipse.cdt.debug.internal.core.CDebugElement;
|
||||||
import org.eclipse.cdt.debug.internal.core.CDebugTarget;
|
import org.eclipse.cdt.debug.internal.core.CDebugTarget;
|
||||||
import org.eclipse.core.resources.IWorkspaceRunnable;
|
import org.eclipse.core.resources.IWorkspaceRunnable;
|
||||||
import org.eclipse.core.resources.ResourcesPlugin;
|
import org.eclipse.core.resources.ResourcesPlugin;
|
||||||
|
@ -18,8 +23,6 @@ import org.eclipse.debug.core.ILaunch;
|
||||||
import org.eclipse.debug.core.model.IDebugTarget;
|
import org.eclipse.debug.core.model.IDebugTarget;
|
||||||
import org.eclipse.debug.core.model.IProcess;
|
import org.eclipse.debug.core.model.IProcess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Provides utility methods for creating debug sessions, targets and
|
* Provides utility methods for creating debug sessions, targets and
|
||||||
|
@ -99,15 +102,25 @@ public class CDebugModel
|
||||||
{
|
{
|
||||||
CDebugCorePlugin.log( e );
|
CDebugCorePlugin.log( e );
|
||||||
}
|
}
|
||||||
|
// Temporary
|
||||||
if ( stopInMain )
|
if ( stopInMain )
|
||||||
breakInMain( cdiTarget );
|
{
|
||||||
|
ICDILocation location = cdiTarget.getSession().getSourceManager().createLocation( "", "main", 0 );
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ICDIBreakpoint bkpt = cdiTarget.getSession().getBreakpointManager().
|
||||||
|
setLocationBreakpoint( ICDIBreakpoint.TEMPORARY,
|
||||||
|
location,
|
||||||
|
null,
|
||||||
|
null );
|
||||||
|
}
|
||||||
|
catch( CDIException e )
|
||||||
|
{
|
||||||
|
((CDebugElement)target[0]).targetRequestFailed( MessageFormat.format( "{0} occurred setting temporary breakpoint.", new String[] { e.toString() } ), e );
|
||||||
|
}
|
||||||
|
}
|
||||||
target[0].resume();
|
target[0].resume();
|
||||||
|
|
||||||
return target[0];
|
return target[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void breakInMain( ICDITarget cdiTarget ) throws DebugException
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue