mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-05 08:46:02 +02:00
Temporary fix for source search path.
This commit is contained in:
parent
0e651d89c6
commit
b5af571676
1 changed files with 26 additions and 0 deletions
|
@ -14,6 +14,7 @@ import org.eclipse.cdt.debug.core.cdi.ICDILocation;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
|
||||||
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.breakpoints.CLineBreakpoint;
|
import org.eclipse.cdt.debug.internal.core.breakpoints.CLineBreakpoint;
|
||||||
|
import org.eclipse.cdt.debug.internal.core.breakpoints.CWatchpoint;
|
||||||
import org.eclipse.cdt.debug.internal.core.model.CDebugElement;
|
import org.eclipse.cdt.debug.internal.core.model.CDebugElement;
|
||||||
import org.eclipse.cdt.debug.internal.core.model.CDebugTarget;
|
import org.eclipse.cdt.debug.internal.core.model.CDebugTarget;
|
||||||
import org.eclipse.core.resources.IMarker;
|
import org.eclipse.core.resources.IMarker;
|
||||||
|
@ -111,6 +112,15 @@ public class CDebugModel
|
||||||
CDebugCorePlugin.log( e );
|
CDebugCorePlugin.log( e );
|
||||||
}
|
}
|
||||||
// Temporary
|
// Temporary
|
||||||
|
try
|
||||||
|
{
|
||||||
|
cdiTarget.getSession().addSearchPaths( new String[] { project.getLocation().toOSString() } );
|
||||||
|
}
|
||||||
|
catch( CDIException e )
|
||||||
|
{
|
||||||
|
((CDebugElement)target[0]).targetRequestFailed( "Operation failed. Reason: ", e );
|
||||||
|
}
|
||||||
|
|
||||||
if ( stopInMain )
|
if ( stopInMain )
|
||||||
{
|
{
|
||||||
ICDILocation location = cdiTarget.getSession().getBreakpointManager().createLocation( "", "main", 0 );
|
ICDILocation location = cdiTarget.getSession().getBreakpointManager().createLocation( "", "main", 0 );
|
||||||
|
@ -219,4 +229,20 @@ public class CDebugModel
|
||||||
return new CLineBreakpoint( resource, attributes, add );
|
return new CLineBreakpoint( resource, attributes, add );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ICWatchpoint createWatchpoint( IResource resource,
|
||||||
|
boolean writeAccess,
|
||||||
|
boolean readAccess,
|
||||||
|
String expression,
|
||||||
|
boolean enabled,
|
||||||
|
int ignoreCount,
|
||||||
|
String condition,
|
||||||
|
boolean add ) throws DebugException
|
||||||
|
{
|
||||||
|
HashMap attributes = new HashMap( 10 );
|
||||||
|
attributes.put( ICBreakpoint.ID, getPluginIdentifier() );
|
||||||
|
attributes.put( ICBreakpoint.ENABLED, new Boolean( enabled ) );
|
||||||
|
attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
|
||||||
|
attributes.put( ICBreakpoint.CONDITION, condition );
|
||||||
|
return new CWatchpoint( resource, attributes, add );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue