mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 06:45:43 +02:00
Move the workaround for bug 102563 into the mi plug-in so that non-gdb CDI clients can get the full path for line breakpoint locations. Fixes bug 155137.
This commit is contained in:
parent
8abe95052b
commit
d1c5dd658c
2 changed files with 6 additions and 1 deletions
|
@ -603,7 +603,7 @@ public class CBreakpointManager implements IBreakpointsListener, IBreakpointMana
|
||||||
ICLineBreakpoint breakpoint = (ICLineBreakpoint)breakpoints[i];
|
ICLineBreakpoint breakpoint = (ICLineBreakpoint)breakpoints[i];
|
||||||
String handle = breakpoint.getSourceHandle();
|
String handle = breakpoint.getSourceHandle();
|
||||||
IPath path = convertPath( handle );
|
IPath path = convertPath( handle );
|
||||||
ICDILineLocation location = cdiTarget.createLineLocation( path.lastSegment()/*path.toPortableString()*/, breakpoint.getLineNumber() );
|
ICDILineLocation location = cdiTarget.createLineLocation( path.toPortableString(), breakpoint.getLineNumber() );
|
||||||
ICDICondition condition = createCondition( breakpoint );
|
ICDICondition condition = createCondition( breakpoint );
|
||||||
b = cdiTarget.setLineBreakpoint( ICDIBreakpoint.REGULAR, location, condition, true );
|
b = cdiTarget.setLineBreakpoint( ICDIBreakpoint.REGULAR, location, condition, true );
|
||||||
} else if ( breakpoints[i] instanceof ICWatchpoint ) {
|
} else if ( breakpoints[i] instanceof ICWatchpoint ) {
|
||||||
|
|
|
@ -83,6 +83,7 @@ import org.eclipse.cdt.debug.mi.core.output.MIFrame;
|
||||||
import org.eclipse.cdt.debug.mi.core.output.MIGDBShowEndianInfo;
|
import org.eclipse.cdt.debug.mi.core.output.MIGDBShowEndianInfo;
|
||||||
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
||||||
import org.eclipse.cdt.debug.mi.core.output.MIThreadSelectInfo;
|
import org.eclipse.cdt.debug.mi.core.output.MIThreadSelectInfo;
|
||||||
|
import org.eclipse.core.runtime.Path;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
|
@ -864,6 +865,10 @@ public class Target extends SessionObject implements ICDITarget {
|
||||||
public ICDILineBreakpoint setLineBreakpoint(int type, ICDILineLocation location,
|
public ICDILineBreakpoint setLineBreakpoint(int type, ICDILineLocation location,
|
||||||
ICDICondition condition, boolean deferred) throws CDIException {
|
ICDICondition condition, boolean deferred) throws CDIException {
|
||||||
BreakpointManager bMgr = ((Session)getSession()).getBreakpointManager();
|
BreakpointManager bMgr = ((Session)getSession()).getBreakpointManager();
|
||||||
|
// See bug 102563. Only pass gdb the source file name, not the full path.
|
||||||
|
// This workaround was in CBreakpointManager in CDT 3.1 but has been moved
|
||||||
|
// here so that non-gdb CDI clients can get the full path.
|
||||||
|
location = createLineLocation( new Path(location.getFile()).lastSegment(), location.getLineNumber() );
|
||||||
return bMgr.setLineBreakpoint(this, type, location, condition, deferred);
|
return bMgr.setLineBreakpoint(this, type, location, condition, deferred);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue