1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-10 01:35:39 +02:00

Bug 125603: Debugger don't stop on breakpoints if src is linked.

This commit is contained in:
Mikhail Khodjaiants 2006-01-30 19:48:37 +00:00
parent f96f4300b0
commit 29c2e5c8da
2 changed files with 16 additions and 0 deletions

View file

@ -1,3 +1,7 @@
2006-01-30 Mikhail Khodjaiants
Bug 125603: Debugger don't stop on breakpoints if src is linked.
* CSourceLookupDirector.java
2006-01-29 Mikhail Khodjaiants
Bug 118894: Allow stopping at other locations other than main().
Applied patch from Ken Ryall (Nokia).

View file

@ -18,7 +18,9 @@ import org.eclipse.cdt.debug.core.sourcelookup.CDirectorySourceContainer;
import org.eclipse.cdt.debug.core.sourcelookup.MappingSourceContainer;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@ -62,6 +64,16 @@ public class CSourceLookupDirector extends AbstractSourceLookupDirector {
public boolean contains( ICBreakpoint breakpoint ) {
try {
String handle = breakpoint.getSourceHandle();
// Check if the breakpoint's resource is a link - we have to handle
// this case differently.
// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=125603
IMarker marker = breakpoint.getMarker();
if ( marker != null ) {
IResource resource = marker.getResource();
if ( resource.isLinked() && resource.getLocation().toOSString().equals( handle ) ) {
return contains( resource.getProject() );
}
}
ISourceContainer[] containers = getSourceContainers();
for ( int i = 0; i < containers.length; ++i ) {
if ( contains( containers[i], handle ) )