mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 08:55:25 +02:00
We don't handle the notification of a breakpoint created in an external translation unit. I.e., if the user imports an executable built outside of Eclipse, and the backend reports that a breakpoint has been created in one of its source files (through, say, a backend shell), CBreakpointManager doesn't handle it correctly.
This commit is contained in:
parent
26f4e54156
commit
34a4df0832
1 changed files with 12 additions and 0 deletions
|
@ -28,6 +28,7 @@ import java.util.Set;
|
|||
import org.eclipse.cdt.core.IAddress;
|
||||
import org.eclipse.cdt.core.IAddressFactory;
|
||||
import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
|
||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||
import org.eclipse.cdt.debug.core.CDIDebugModel;
|
||||
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
|
||||
import org.eclipse.cdt.debug.core.CDebugUtils;
|
||||
|
@ -837,6 +838,17 @@ public class CBreakpointManager implements IBreakpointsListener, IBreakpointMana
|
|||
sourceHandle = ((IStorage)sourceElement).getFullPath().toOSString();
|
||||
resource = ResourcesPlugin.getWorkspace().getRoot();
|
||||
}
|
||||
else if ( sourceElement instanceof ITranslationUnit ) {
|
||||
ITranslationUnit translationUnit = (ITranslationUnit)sourceElement;
|
||||
sourceHandle = translationUnit.getPath().toString();
|
||||
resource = translationUnit.getResource();
|
||||
|
||||
// an IExternalTranslationUnit doesn't have an IResource
|
||||
if (resource == null) {
|
||||
resource = getProject();
|
||||
}
|
||||
}
|
||||
|
||||
breakpoint = createLineBreakpoint( sourceHandle, resource, cdiBreakpoint );
|
||||
}
|
||||
else if ( cdiBreakpoint instanceof ICDIFunctionBreakpoint ) {
|
||||
|
|
Loading…
Add table
Reference in a new issue