mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-12 18:55:38 +02:00
Bug 125603: Debugger don't stop on breakpoints if src is linked.
This commit is contained in:
parent
f96f4300b0
commit
29c2e5c8da
2 changed files with 16 additions and 0 deletions
|
@ -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
|
2006-01-29 Mikhail Khodjaiants
|
||||||
Bug 118894: Allow stopping at other locations other than main().
|
Bug 118894: Allow stopping at other locations other than main().
|
||||||
Applied patch from Ken Ryall (Nokia).
|
Applied patch from Ken Ryall (Nokia).
|
||||||
|
|
|
@ -18,7 +18,9 @@ import org.eclipse.cdt.debug.core.sourcelookup.CDirectorySourceContainer;
|
||||||
import org.eclipse.cdt.debug.core.sourcelookup.MappingSourceContainer;
|
import org.eclipse.cdt.debug.core.sourcelookup.MappingSourceContainer;
|
||||||
import org.eclipse.core.resources.IContainer;
|
import org.eclipse.core.resources.IContainer;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
|
import org.eclipse.core.resources.IMarker;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.core.runtime.Path;
|
import org.eclipse.core.runtime.Path;
|
||||||
|
@ -62,6 +64,16 @@ public class CSourceLookupDirector extends AbstractSourceLookupDirector {
|
||||||
public boolean contains( ICBreakpoint breakpoint ) {
|
public boolean contains( ICBreakpoint breakpoint ) {
|
||||||
try {
|
try {
|
||||||
String handle = breakpoint.getSourceHandle();
|
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();
|
ISourceContainer[] containers = getSourceContainers();
|
||||||
for ( int i = 0; i < containers.length; ++i ) {
|
for ( int i = 0; i < containers.length; ++i ) {
|
||||||
if ( contains( containers[i], handle ) )
|
if ( contains( containers[i], handle ) )
|
||||||
|
|
Loading…
Add table
Reference in a new issue