diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog index 2cdf6a52678..4a7e74aae29 100644 --- a/debug/org.eclipse.cdt.debug.ui/ChangeLog +++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog @@ -1,3 +1,8 @@ +2003-11-05 Mikhail Khodjaiants + The argument type of the 'getBreakpointAddress' of 'ICBreakpointManager' is changed from + 'ICBreakpoint' to 'ICBreakpointManager'. + * DisassemblyMarkerAnnotationModel.java + 2003-11-03 Mikhail Khodjaiants Fix for PR 45957: Memory view: last column does not show updates. * MemoryPresentation.java diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DisassemblyMarkerAnnotationModel.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DisassemblyMarkerAnnotationModel.java index 0c715b2b635..d6bf7f6f494 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DisassemblyMarkerAnnotationModel.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DisassemblyMarkerAnnotationModel.java @@ -9,6 +9,7 @@ import java.util.ArrayList; import org.eclipse.cdt.debug.core.ICBreakpointManager; import org.eclipse.cdt.debug.core.model.ICAddressBreakpoint; +import org.eclipse.cdt.debug.core.model.ICBreakpoint; import org.eclipse.cdt.debug.core.sourcelookup.IDisassemblyStorage; import org.eclipse.cdt.debug.internal.core.breakpoints.CAddressBreakpoint; import org.eclipse.cdt.debug.internal.core.breakpoints.CFunctionBreakpoint; @@ -240,16 +241,19 @@ public class DisassemblyMarkerAnnotationModel extends AbstractMarkerAnnotationMo private Position createPositionFromLineBreakpoint( IMarker marker ) { - if ( fStorage == null ) - return null; - IDebugTarget target = fStorage.getDebugTarget(); - if ( target != null && target.getAdapter( ICBreakpointManager.class ) != null ) + if ( fStorage != null ) { - ICBreakpointManager bm = (ICBreakpointManager)target.getAdapter( ICBreakpointManager.class ); - long address = bm.getBreakpointAddress( DebugPlugin.getDefault().getBreakpointManager().getBreakpoint( marker ) ); - if ( address != 0 ) - { - return createPositionFromAddress( address ); + IBreakpoint breakpoint = DebugPlugin.getDefault().getBreakpointManager().getBreakpoint( marker ); + if ( breakpoint instanceof ICBreakpoint ) + { + IDebugTarget target = fStorage.getDebugTarget(); + if ( target != null && target.getAdapter( ICBreakpointManager.class ) != null ) + { + ICBreakpointManager bm = (ICBreakpointManager)target.getAdapter( ICBreakpointManager.class ); + long address = bm.getBreakpointAddress( (ICBreakpoint)breakpoint ); + if ( address != 0 ) + return createPositionFromAddress( address ); + } } } return null;