mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-11 18:25:40 +02:00
Fix for bugs 112008 and 111828.
Applied modified patch from Matthias Spycher (matthias@coware.com).
This commit is contained in:
parent
fe343ab7d2
commit
47aa5eed64
2 changed files with 36 additions and 5 deletions
|
@ -1,3 +1,13 @@
|
||||||
|
2005-10-24 Mikhail Khodjaiants
|
||||||
|
Fix for bugs 112008 and 111828.
|
||||||
|
Applied modified patch from Matthias Spycher (matthias@coware.com).
|
||||||
|
* CBreakpointManager.java
|
||||||
|
|
||||||
|
2005-09-30 Mikhail Khodjaiants
|
||||||
|
Partial fix for bug 109950: Major crash and stack overflow if two projects reference each other.
|
||||||
|
* CDebugTarget.java
|
||||||
|
* CSourceLookupDirector.java
|
||||||
|
|
||||||
2005-09-16 Mikhail Khodjaiants
|
2005-09-16 Mikhail Khodjaiants
|
||||||
Bug 109785: "mi_cmd_var_create: unable to create variable object" when stepping out of stack frame.
|
Bug 109785: "mi_cmd_var_create: unable to create variable object" when stepping out of stack frame.
|
||||||
* CStackFrame.java
|
* CStackFrame.java
|
||||||
|
|
|
@ -7,9 +7,12 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* QNX Software Systems - Initial API and implementation
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
* Matthias Spycher (matthias@coware.com) - patch for bug #112008
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.debug.internal.core;
|
package org.eclipse.cdt.debug.internal.core;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
@ -70,6 +73,7 @@ import org.eclipse.debug.core.IBreakpointsListener;
|
||||||
import org.eclipse.debug.core.model.IBreakpoint;
|
import org.eclipse.debug.core.model.IBreakpoint;
|
||||||
import org.eclipse.debug.core.model.IDebugTarget;
|
import org.eclipse.debug.core.model.IDebugTarget;
|
||||||
import org.eclipse.debug.core.model.ISourceLocator;
|
import org.eclipse.debug.core.model.ISourceLocator;
|
||||||
|
import org.eclipse.debug.core.sourcelookup.containers.LocalFileStorage;
|
||||||
|
|
||||||
public class CBreakpointManager implements IBreakpointsListener, IBreakpointManagerListener, ICDIEventListener, IAdaptable {
|
public class CBreakpointManager implements IBreakpointsListener, IBreakpointManagerListener, ICDIEventListener, IAdaptable {
|
||||||
|
|
||||||
|
@ -189,8 +193,21 @@ public class CBreakpointManager implements IBreakpointsListener, IBreakpointMana
|
||||||
String sourceHandle = file;
|
String sourceHandle = file;
|
||||||
if ( !isEmpty( file ) ) {
|
if ( !isEmpty( file ) ) {
|
||||||
Object sourceElement = getSourceElement( file );
|
Object sourceElement = getSourceElement( file );
|
||||||
sourceHandle = ( sourceElement instanceof IFile ) ? ((IFile)sourceElement).getLocation().toOSString() : ((IStorage)sourceElement).getFullPath().toOSString();
|
if ( sourceElement instanceof IFile ) {
|
||||||
return sourceHandle.equals( ((ICLineBreakpoint)breakpoint).getSourceHandle() ) && location.getLineNumber() == ((ICLineBreakpoint)breakpoint).getLineNumber();
|
sourceHandle = ((IFile)sourceElement).getLocation().toOSString();
|
||||||
|
}
|
||||||
|
else if ( sourceElement instanceof IStorage ) {
|
||||||
|
sourceHandle = ((IStorage)sourceElement).getFullPath().toOSString();
|
||||||
|
}
|
||||||
|
String bpSourceHandle = ((ICLineBreakpoint)breakpoint).getSourceHandle();
|
||||||
|
if ( sourceElement instanceof LocalFileStorage ) { // see bug #112008
|
||||||
|
try {
|
||||||
|
bpSourceHandle = new File( bpSourceHandle ).getCanonicalPath();
|
||||||
|
}
|
||||||
|
catch( IOException e ) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sourceHandle.equals( bpSourceHandle ) && location.getLineNumber() == ((ICLineBreakpoint)breakpoint).getLineNumber();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( breakpoint instanceof ICWatchpoint && cdiBreakpoint instanceof ICDIWatchpoint ) {
|
if ( breakpoint instanceof ICWatchpoint && cdiBreakpoint instanceof ICDIWatchpoint ) {
|
||||||
|
@ -658,9 +675,13 @@ public class CBreakpointManager implements IBreakpointsListener, IBreakpointMana
|
||||||
Object sourceElement = getSourceElement( file );
|
Object sourceElement = getSourceElement( file );
|
||||||
String sourceHandle = file;
|
String sourceHandle = file;
|
||||||
IResource resource = getProject();
|
IResource resource = getProject();
|
||||||
if ( sourceElement instanceof IFile || sourceElement instanceof IStorage ) {
|
if ( sourceElement instanceof IFile ) {
|
||||||
sourceHandle = ( sourceElement instanceof IFile ) ? ((IFile)sourceElement).getLocation().toOSString() : ((IStorage)sourceElement).getFullPath().toOSString();
|
sourceHandle = ((IFile)sourceElement).getLocation().toOSString();
|
||||||
resource = ( sourceElement instanceof IFile ) ? (IResource)sourceElement : ResourcesPlugin.getWorkspace().getRoot();
|
resource = (IResource)sourceElement;
|
||||||
|
}
|
||||||
|
else if ( sourceElement instanceof IStorage ) {
|
||||||
|
sourceHandle = ((IStorage)sourceElement).getFullPath().toOSString();
|
||||||
|
resource = ResourcesPlugin.getWorkspace().getRoot();
|
||||||
}
|
}
|
||||||
breakpoint = createLineBreakpoint( sourceHandle, resource, cdiBreakpoint );
|
breakpoint = createLineBreakpoint( sourceHandle, resource, cdiBreakpoint );
|
||||||
// else if ( !isEmpty( cdiBreakpoint.getLocation().getFunction() ) ) {
|
// else if ( !isEmpty( cdiBreakpoint.getLocation().getFunction() ) ) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue