mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
If breakpoint is a line breakpoint check if source locator contains the file instead of container project.
This commit is contained in:
parent
6f2e1a8f42
commit
86bd34cb79
2 changed files with 30 additions and 13 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-09-10 Mikhail Khodjaiants
|
||||
If breakpoint is a line breakpoint check if source locator contains this file
|
||||
instead of container project.
|
||||
* CDebugTarget.java
|
||||
|
||||
2003-09-10 Mikhail Khodjaiants
|
||||
Fix for PR 42790: Memory view is not cleared when target is terminated.
|
||||
* CFormattedMemoryBlock.java: fire 'terminate' event when block is disposing.
|
||||
|
|
|
@ -88,6 +88,7 @@ import org.eclipse.cdt.debug.internal.core.sourcelookup.DisassemblyManager;
|
|||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IMarkerDelta;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.resources.IResourceChangeListener;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IAdaptable;
|
||||
|
@ -394,17 +395,27 @@ public class CDebugTarget extends CDebugElement
|
|||
|
||||
private boolean isTargetBreakpoint( IBreakpoint bp )
|
||||
{
|
||||
IProject project = bp.getMarker().getResource().getProject();
|
||||
IResource resource = bp.getMarker().getResource();
|
||||
if ( bp instanceof ICLineBreakpoint )
|
||||
{
|
||||
if ( getSourceLocator() instanceof IAdaptable )
|
||||
{
|
||||
ICSourceLocator sl = (ICSourceLocator)((IAdaptable)getSourceLocator()).getAdapter( ICSourceLocator.class );
|
||||
if ( sl != null )
|
||||
return sl.contains( resource );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
IProject project = resource.getProject();
|
||||
if ( project != null && project.exists() )
|
||||
{
|
||||
if ( getSourceLocator() instanceof IAdaptable )
|
||||
{
|
||||
ICSourceLocator sl = (ICSourceLocator)((IAdaptable)getSourceLocator()).getAdapter( ICSourceLocator.class );
|
||||
if ( sl != null )
|
||||
{
|
||||
return sl.contains( project );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( project.equals( getExecFile().getProject() ) )
|
||||
|
@ -412,7 +423,8 @@ public class CDebugTarget extends CDebugElement
|
|||
return CDebugUtils.isReferencedProject( getExecFile().getProject(), project );
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void initializeRegisters()
|
||||
|
|
Loading…
Add table
Reference in a new issue