mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +02:00
Managing breakpoints from the gdb console.
This commit is contained in:
parent
01c7d568b7
commit
8fdc0ff5f8
17 changed files with 452 additions and 45 deletions
|
@ -1,3 +1,18 @@
|
||||||
|
2003-01-27 Mikhail Khodjaiants
|
||||||
|
Managing breakpoints from the gdb console.
|
||||||
|
* CDebugCorePlugin.java
|
||||||
|
* CDebugModel.java
|
||||||
|
* IAsyncExecutor.java
|
||||||
|
* ICSourceLocator.java
|
||||||
|
* CAddressBreakpoint.java
|
||||||
|
* CBreakpoint.java
|
||||||
|
* CFunctionBreakpoint.java
|
||||||
|
* CLineBreakpoint.java
|
||||||
|
* CWatchpoint.java
|
||||||
|
* CDebugTarget.java
|
||||||
|
* CSourceLocator.java
|
||||||
|
* CSourceManager.java
|
||||||
|
|
||||||
2003-01-27 Mikhail Khodjaiants
|
2003-01-27 Mikhail Khodjaiants
|
||||||
Use 'equals' to compare CDI variables instead of names.
|
Use 'equals' to compare CDI variables instead of names.
|
||||||
* CStackFrame.java
|
* CStackFrame.java
|
||||||
|
|
|
@ -39,6 +39,8 @@ public class CDebugCorePlugin extends Plugin
|
||||||
|
|
||||||
private HashMap fDebugConfigurations;
|
private HashMap fDebugConfigurations;
|
||||||
|
|
||||||
|
private IAsyncExecutor fAsyncExecutor = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The constructor.
|
* The constructor.
|
||||||
*/
|
*/
|
||||||
|
@ -199,4 +201,15 @@ public class CDebugCorePlugin extends Plugin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setAsyncExecutor( IAsyncExecutor executor )
|
||||||
|
{
|
||||||
|
fAsyncExecutor = executor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void asyncExec( Runnable runnable )
|
||||||
|
{
|
||||||
|
if ( fAsyncExecutor != null )
|
||||||
|
fAsyncExecutor.asyncExec( runnable );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,10 +14,12 @@ import org.eclipse.cdt.debug.core.cdi.ICDIConfiguration;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDILocation;
|
import org.eclipse.cdt.debug.core.cdi.ICDILocation;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISessionObject;
|
import org.eclipse.cdt.debug.core.cdi.ICDISessionObject;
|
||||||
import org.eclipse.cdt.debug.core.cdi.event.ICDISuspendedEvent;
|
import org.eclipse.cdt.debug.core.cdi.event.ICDISuspendedEvent;
|
||||||
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIExpression;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIExpression;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
||||||
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
|
||||||
import org.eclipse.cdt.debug.core.model.ICAddressBreakpoint;
|
import org.eclipse.cdt.debug.core.model.ICAddressBreakpoint;
|
||||||
import org.eclipse.cdt.debug.core.model.ICBreakpoint;
|
import org.eclipse.cdt.debug.core.model.ICBreakpoint;
|
||||||
import org.eclipse.cdt.debug.core.model.ICDebugTargetType;
|
import org.eclipse.cdt.debug.core.model.ICDebugTargetType;
|
||||||
|
@ -307,6 +309,23 @@ public class CDebugModel
|
||||||
return new CLineBreakpoint( resource, attributes, add );
|
return new CLineBreakpoint( resource, attributes, add );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ICLineBreakpoint createLineBreakpoint( IResource resource,
|
||||||
|
int lineNumber,
|
||||||
|
boolean enabled,
|
||||||
|
int ignoreCount,
|
||||||
|
String condition,
|
||||||
|
ICDIBreakpoint cdiBreakpoint,
|
||||||
|
boolean add ) throws DebugException
|
||||||
|
{
|
||||||
|
HashMap attributes = new HashMap( 10 );
|
||||||
|
attributes.put( ICBreakpoint.ID, getPluginIdentifier() );
|
||||||
|
attributes.put( IMarker.LINE_NUMBER, new Integer( lineNumber ) );
|
||||||
|
attributes.put( ICBreakpoint.ENABLED, new Boolean( enabled ) );
|
||||||
|
attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
|
||||||
|
attributes.put( ICBreakpoint.CONDITION, condition );
|
||||||
|
return new CLineBreakpoint( resource, attributes, cdiBreakpoint, add );
|
||||||
|
}
|
||||||
|
|
||||||
public static ICAddressBreakpoint addressBreakpointExists( IResource resource, long address ) throws CoreException
|
public static ICAddressBreakpoint addressBreakpointExists( IResource resource, long address ) throws CoreException
|
||||||
{
|
{
|
||||||
String modelId = getPluginIdentifier();
|
String modelId = getPluginIdentifier();
|
||||||
|
@ -341,7 +360,6 @@ public class CDebugModel
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ICAddressBreakpoint createAddressBreakpoint( IResource resource,
|
public static ICAddressBreakpoint createAddressBreakpoint( IResource resource,
|
||||||
int lineNumber,
|
|
||||||
long address,
|
long address,
|
||||||
boolean enabled,
|
boolean enabled,
|
||||||
int ignoreCount,
|
int ignoreCount,
|
||||||
|
@ -350,7 +368,6 @@ public class CDebugModel
|
||||||
{
|
{
|
||||||
HashMap attributes = new HashMap( 10 );
|
HashMap attributes = new HashMap( 10 );
|
||||||
attributes.put( ICBreakpoint.ID, getPluginIdentifier() );
|
attributes.put( ICBreakpoint.ID, getPluginIdentifier() );
|
||||||
// attributes.put( IMarker.LINE_NUMBER, new Integer( lineNumber ) );
|
|
||||||
attributes.put( IMarker.CHAR_START, new Integer( 0 ) );
|
attributes.put( IMarker.CHAR_START, new Integer( 0 ) );
|
||||||
attributes.put( IMarker.CHAR_END, new Integer( 0 ) );
|
attributes.put( IMarker.CHAR_END, new Integer( 0 ) );
|
||||||
attributes.put( IMarker.LINE_NUMBER, new Integer( -1 ) );
|
attributes.put( IMarker.LINE_NUMBER, new Integer( -1 ) );
|
||||||
|
@ -361,6 +378,26 @@ public class CDebugModel
|
||||||
return new CAddressBreakpoint( resource, attributes, add );
|
return new CAddressBreakpoint( resource, attributes, add );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ICAddressBreakpoint createAddressBreakpoint( IResource resource,
|
||||||
|
long address,
|
||||||
|
boolean enabled,
|
||||||
|
int ignoreCount,
|
||||||
|
String condition,
|
||||||
|
ICDIBreakpoint breakpoint,
|
||||||
|
boolean add ) throws DebugException
|
||||||
|
{
|
||||||
|
HashMap attributes = new HashMap( 10 );
|
||||||
|
attributes.put( ICBreakpoint.ID, getPluginIdentifier() );
|
||||||
|
attributes.put( IMarker.CHAR_START, new Integer( 0 ) );
|
||||||
|
attributes.put( IMarker.CHAR_END, new Integer( 0 ) );
|
||||||
|
attributes.put( IMarker.LINE_NUMBER, new Integer( -1 ) );
|
||||||
|
attributes.put( ICAddressBreakpoint.ADDRESS, Long.toString( address ) );
|
||||||
|
attributes.put( ICBreakpoint.ENABLED, new Boolean( enabled ) );
|
||||||
|
attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
|
||||||
|
attributes.put( ICBreakpoint.CONDITION, condition );
|
||||||
|
return new CAddressBreakpoint( resource, attributes, breakpoint, add );
|
||||||
|
}
|
||||||
|
|
||||||
public static ICWatchpoint watchpointExists( IResource resource, boolean write, boolean read, String expression ) throws CoreException
|
public static ICWatchpoint watchpointExists( IResource resource, boolean write, boolean read, String expression ) throws CoreException
|
||||||
{
|
{
|
||||||
String modelId = getPluginIdentifier();
|
String modelId = getPluginIdentifier();
|
||||||
|
@ -406,6 +443,27 @@ public class CDebugModel
|
||||||
return new CWatchpoint( resource, attributes, add );
|
return new CWatchpoint( resource, attributes, add );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ICWatchpoint createWatchpoint( IResource resource,
|
||||||
|
boolean writeAccess,
|
||||||
|
boolean readAccess,
|
||||||
|
String expression,
|
||||||
|
boolean enabled,
|
||||||
|
int ignoreCount,
|
||||||
|
String condition,
|
||||||
|
ICDIWatchpoint watchpoint,
|
||||||
|
boolean add ) throws DebugException
|
||||||
|
{
|
||||||
|
HashMap attributes = new HashMap( 10 );
|
||||||
|
attributes.put( ICBreakpoint.ID, getPluginIdentifier() );
|
||||||
|
attributes.put( ICBreakpoint.ENABLED, new Boolean( enabled ) );
|
||||||
|
attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
|
||||||
|
attributes.put( ICBreakpoint.CONDITION, condition );
|
||||||
|
attributes.put( ICWatchpoint.EXPRESSION, expression );
|
||||||
|
attributes.put( ICWatchpoint.READ, new Boolean( readAccess ) );
|
||||||
|
attributes.put( ICWatchpoint.WRITE, new Boolean( writeAccess ) );
|
||||||
|
return new CWatchpoint( resource, attributes, watchpoint, add );
|
||||||
|
}
|
||||||
|
|
||||||
public static IExpression createExpression( IDebugTarget target, String text ) throws DebugException
|
public static IExpression createExpression( IDebugTarget target, String text ) throws DebugException
|
||||||
{
|
{
|
||||||
if ( target != null && target instanceof CDebugTarget )
|
if ( target != null && target instanceof CDebugTarget )
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
/*
|
||||||
|
*(c) Copyright QNX Software Systems Ltd. 2002.
|
||||||
|
* All Rights Reserved.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.eclipse.cdt.debug.core;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enter type comment.
|
||||||
|
*
|
||||||
|
* @since: Jan 27, 2003
|
||||||
|
*/
|
||||||
|
public interface IAsyncExecutor
|
||||||
|
{
|
||||||
|
void asyncExec( Runnable runnable );
|
||||||
|
}
|
|
@ -50,4 +50,6 @@ public interface ICSourceLocator extends ISourceLocator
|
||||||
* @return whether this locator is able to locate the given resource
|
* @return whether this locator is able to locate the given resource
|
||||||
*/
|
*/
|
||||||
boolean contains( IResource resource );
|
boolean contains( IResource resource );
|
||||||
|
|
||||||
|
Object findSourceElement( String fileName );
|
||||||
}
|
}
|
|
@ -7,6 +7,7 @@ package org.eclipse.cdt.debug.internal.core.breakpoints;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
|
||||||
import org.eclipse.cdt.debug.core.model.ICAddressBreakpoint;
|
import org.eclipse.cdt.debug.core.model.ICAddressBreakpoint;
|
||||||
import org.eclipse.core.resources.IMarker;
|
import org.eclipse.core.resources.IMarker;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
|
@ -35,7 +36,15 @@ public class CAddressBreakpoint extends CBreakpoint implements ICAddressBreakpoi
|
||||||
*/
|
*/
|
||||||
public CAddressBreakpoint( IResource resource, Map attributes, boolean add ) throws DebugException
|
public CAddressBreakpoint( IResource resource, Map attributes, boolean add ) throws DebugException
|
||||||
{
|
{
|
||||||
super( resource, C_ADDRESS_BREAKPOINT, attributes, add );
|
super( resource, getMarkerType(), attributes, add );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor for CAddressBreakpoint.
|
||||||
|
*/
|
||||||
|
public CAddressBreakpoint( IResource resource, Map attributes, ICDIBreakpoint cdiBreakpoint, boolean add ) throws DebugException
|
||||||
|
{
|
||||||
|
super( resource, getMarkerType(), attributes, cdiBreakpoint, add );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -9,6 +9,7 @@ package org.eclipse.cdt.debug.internal.core.breakpoints;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.core.CDebugModel;
|
import org.eclipse.cdt.debug.core.CDebugModel;
|
||||||
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
|
||||||
import org.eclipse.cdt.debug.core.model.ICBreakpoint;
|
import org.eclipse.cdt.debug.core.model.ICBreakpoint;
|
||||||
import org.eclipse.core.resources.IMarker;
|
import org.eclipse.core.resources.IMarker;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
|
@ -32,6 +33,12 @@ public abstract class CBreakpoint extends Breakpoint
|
||||||
implements ICBreakpoint,
|
implements ICBreakpoint,
|
||||||
IDebugEventSetListener
|
IDebugEventSetListener
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* This field is used to pass a CDI breakpoint to the target if the breakpoint
|
||||||
|
* is created in gdb console.
|
||||||
|
*/
|
||||||
|
private ICDIBreakpoint fExternalBreakpoint = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for CBreakpoint.
|
* Constructor for CBreakpoint.
|
||||||
*/
|
*/
|
||||||
|
@ -64,6 +71,32 @@ public abstract class CBreakpoint extends Breakpoint
|
||||||
run( wr );
|
run( wr );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor for CBreakpoint.
|
||||||
|
*/
|
||||||
|
public CBreakpoint( final IResource resource, final String markerType, final Map attributes, final ICDIBreakpoint cdiBreakpoint, final boolean add ) throws DebugException
|
||||||
|
{
|
||||||
|
setExternalBreakpoint( cdiBreakpoint );
|
||||||
|
IWorkspaceRunnable wr= new IWorkspaceRunnable()
|
||||||
|
{
|
||||||
|
public void run( IProgressMonitor monitor ) throws CoreException
|
||||||
|
{
|
||||||
|
// create the marker
|
||||||
|
setMarker( resource.createMarker( markerType ) );
|
||||||
|
|
||||||
|
// set attributes
|
||||||
|
ensureMarker().setAttributes( attributes );
|
||||||
|
|
||||||
|
//set the marker message
|
||||||
|
setAttribute( IMarker.MESSAGE, getMarkerMessage() );
|
||||||
|
|
||||||
|
// add to breakpoint manager if requested
|
||||||
|
register( add );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
run( wr );
|
||||||
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.core.model.IBreakpoint#getModelIdentifier()
|
* @see org.eclipse.debug.core.model.IBreakpoint#getModelIdentifier()
|
||||||
*/
|
*/
|
||||||
|
@ -224,4 +257,14 @@ public abstract class CBreakpoint extends Breakpoint
|
||||||
{
|
{
|
||||||
super.setAttribute( attributeName, value );
|
super.setAttribute( attributeName, value );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ICDIBreakpoint getExternalBreakpoint()
|
||||||
|
{
|
||||||
|
return fExternalBreakpoint;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExternalBreakpoint( ICDIBreakpoint cdiBreakpoint )
|
||||||
|
{
|
||||||
|
fExternalBreakpoint = cdiBreakpoint;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ package org.eclipse.cdt.debug.internal.core.breakpoints;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
|
||||||
import org.eclipse.cdt.debug.core.model.ICFunctionBreakpoint;
|
import org.eclipse.cdt.debug.core.model.ICFunctionBreakpoint;
|
||||||
import org.eclipse.core.resources.IMarker;
|
import org.eclipse.core.resources.IMarker;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
|
@ -42,7 +43,15 @@ public class CFunctionBreakpoint extends CBreakpoint implements ICFunctionBreakp
|
||||||
*/
|
*/
|
||||||
public CFunctionBreakpoint( IResource resource, Map attributes, boolean add ) throws DebugException
|
public CFunctionBreakpoint( IResource resource, Map attributes, boolean add ) throws DebugException
|
||||||
{
|
{
|
||||||
super( resource, C_FUNCTION_BREAKPOINT, attributes, add );
|
super( resource, getMarkerType(), attributes, add );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor for CFunctionBreakpoint.
|
||||||
|
*/
|
||||||
|
public CFunctionBreakpoint( IResource resource, Map attributes, ICDIBreakpoint cdiBreakpoint, boolean add ) throws DebugException
|
||||||
|
{
|
||||||
|
super( resource, getMarkerType(), attributes, cdiBreakpoint, add );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -7,6 +7,7 @@ package org.eclipse.cdt.debug.internal.core.breakpoints;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
|
||||||
import org.eclipse.cdt.debug.core.model.ICLineBreakpoint;
|
import org.eclipse.cdt.debug.core.model.ICLineBreakpoint;
|
||||||
import org.eclipse.core.resources.IMarker;
|
import org.eclipse.core.resources.IMarker;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
|
@ -38,6 +39,14 @@ public class CLineBreakpoint extends CBreakpoint implements ICLineBreakpoint
|
||||||
super( resource, getMarkerType(), attributes, add );
|
super( resource, getMarkerType(), attributes, add );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor for CLineBreakpoint.
|
||||||
|
*/
|
||||||
|
public CLineBreakpoint( IResource resource, Map attributes, ICDIBreakpoint cdiBreakpoint, boolean add ) throws DebugException
|
||||||
|
{
|
||||||
|
super( resource, getMarkerType(), attributes, cdiBreakpoint, add );
|
||||||
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.core.model.ILineBreakpoint#getLineNumber()
|
* @see org.eclipse.debug.core.model.ILineBreakpoint#getLineNumber()
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -7,6 +7,7 @@ package org.eclipse.cdt.debug.internal.core.breakpoints;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
|
||||||
import org.eclipse.cdt.debug.core.model.ICWatchpoint;
|
import org.eclipse.cdt.debug.core.model.ICWatchpoint;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
@ -31,17 +32,20 @@ public class CWatchpoint extends CBreakpoint implements ICWatchpoint
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for CWatchpoint.
|
* Constructor for CWatchpoint.
|
||||||
* @param resource
|
|
||||||
* @param markerType
|
|
||||||
* @param attributes
|
|
||||||
* @param add
|
|
||||||
* @throws DebugException
|
|
||||||
*/
|
*/
|
||||||
public CWatchpoint( IResource resource, Map attributes, boolean add ) throws DebugException
|
public CWatchpoint( IResource resource, Map attributes, boolean add ) throws DebugException
|
||||||
{
|
{
|
||||||
super( resource, getMarkerType(), attributes, add );
|
super( resource, getMarkerType(), attributes, add );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor for CWatchpoint.
|
||||||
|
*/
|
||||||
|
public CWatchpoint( IResource resource, Map attributes, ICDIWatchpoint watchpoint, boolean add ) throws DebugException
|
||||||
|
{
|
||||||
|
super( resource, getMarkerType(), attributes, watchpoint, add );
|
||||||
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.ICWatchpoint#isWriteType()
|
* @see org.eclipse.cdt.debug.core.ICWatchpoint#isWriteType()
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -74,6 +74,7 @@ import org.eclipse.cdt.debug.internal.core.CMemoryManager;
|
||||||
import org.eclipse.cdt.debug.internal.core.CSharedLibraryManager;
|
import org.eclipse.cdt.debug.internal.core.CSharedLibraryManager;
|
||||||
import org.eclipse.cdt.debug.internal.core.ICDebugInternalConstants;
|
import org.eclipse.cdt.debug.internal.core.ICDebugInternalConstants;
|
||||||
import org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint;
|
import org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint;
|
||||||
|
import org.eclipse.cdt.debug.internal.core.breakpoints.CWatchpoint;
|
||||||
import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceManager;
|
import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceManager;
|
||||||
import org.eclipse.cdt.debug.internal.core.sourcelookup.DisassemblyManager;
|
import org.eclipse.cdt.debug.internal.core.sourcelookup.DisassemblyManager;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
|
@ -901,6 +902,14 @@ public class CDebugTarget extends CDebugElement
|
||||||
if ( ((ICDISharedLibrary)source).areSymbolsLoaded() )
|
if ( ((ICDISharedLibrary)source).areSymbolsLoaded() )
|
||||||
setRetryBreakpoints( true );
|
setRetryBreakpoints( true );
|
||||||
}
|
}
|
||||||
|
if ( source instanceof ICDILocationBreakpoint )
|
||||||
|
{
|
||||||
|
handleLocationBreakpointCreatedEvent( (ICDILocationBreakpoint)source );
|
||||||
|
}
|
||||||
|
if ( source instanceof ICDIWatchpoint )
|
||||||
|
{
|
||||||
|
handleWatchpointCreatedEvent( (ICDIWatchpoint)source );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if ( event instanceof ICDISuspendedEvent )
|
else if ( event instanceof ICDISuspendedEvent )
|
||||||
{
|
{
|
||||||
|
@ -933,6 +942,10 @@ public class CDebugTarget extends CDebugElement
|
||||||
{
|
{
|
||||||
getSharedLibraryManager().sharedLibraryUnloaded( (ICDISharedLibrary)source );
|
getSharedLibraryManager().sharedLibraryUnloaded( (ICDISharedLibrary)source );
|
||||||
}
|
}
|
||||||
|
if ( source instanceof ICDIBreakpoint )
|
||||||
|
{
|
||||||
|
handleBreakpointDestroyedEvent( (ICDIBreakpoint)source );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if ( event instanceof ICDIDisconnectedEvent )
|
else if ( event instanceof ICDIDisconnectedEvent )
|
||||||
{
|
{
|
||||||
|
@ -1463,6 +1476,126 @@ public class CDebugTarget extends CDebugElement
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void handleLocationBreakpointCreatedEvent( final ICDILocationBreakpoint breakpoint )
|
||||||
|
{
|
||||||
|
Runnable runnable = new Runnable()
|
||||||
|
{
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
doHandleLocationBreakpointCreatedEvent( breakpoint );
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
CDebugCorePlugin.getDefault().asyncExec( runnable );
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void doHandleLocationBreakpointCreatedEvent( ICDILocationBreakpoint breakpoint )
|
||||||
|
{
|
||||||
|
if ( breakpoint.isTemporary() || getBreakpoints().containsValue( breakpoint ) )
|
||||||
|
return;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if ( breakpoint.getLocation().getFile() != null && breakpoint.getLocation().getFile().length() > 0 )
|
||||||
|
{
|
||||||
|
if ( getSourceLocator() instanceof IAdaptable && ((IAdaptable)getSourceLocator()).getAdapter( ICSourceLocator.class ) != null )
|
||||||
|
{
|
||||||
|
Object sourceElement = ((ICSourceLocator)((IAdaptable)getSourceLocator()).getAdapter( ICSourceLocator.class )).findSourceElement( breakpoint.getLocation().getFile() );
|
||||||
|
if ( sourceElement != null && sourceElement instanceof IFile )
|
||||||
|
{
|
||||||
|
CDebugModel.createLineBreakpoint( (IFile)sourceElement,
|
||||||
|
breakpoint.getLocation().getLineNumber(),
|
||||||
|
breakpoint.isEnabled(),
|
||||||
|
breakpoint.getCondition().getIgnoreCount(),
|
||||||
|
breakpoint.getCondition().getExpression(),
|
||||||
|
breakpoint,
|
||||||
|
true );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( breakpoint.getLocation().getAddress() > 0 )
|
||||||
|
{
|
||||||
|
CDebugModel.createAddressBreakpoint( getExecFile(),
|
||||||
|
breakpoint.getLocation().getAddress(),
|
||||||
|
breakpoint.isEnabled(),
|
||||||
|
breakpoint.getCondition().getIgnoreCount(),
|
||||||
|
breakpoint.getCondition().getExpression(),
|
||||||
|
breakpoint,
|
||||||
|
true );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch( CDIException e )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
catch( DebugException e )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleWatchpointCreatedEvent( final ICDIWatchpoint watchpoint )
|
||||||
|
{
|
||||||
|
Runnable runnable = new Runnable()
|
||||||
|
{
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
doHandleWatchpointCreatedEvent( watchpoint );
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
CDebugCorePlugin.getDefault().asyncExec( runnable );
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void doHandleWatchpointCreatedEvent( ICDIWatchpoint watchpoint )
|
||||||
|
{
|
||||||
|
if ( getBreakpoints().containsValue( watchpoint ) )
|
||||||
|
return;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
CDebugModel.createWatchpoint( getExecFile().getProject(),
|
||||||
|
watchpoint.isWriteType(),
|
||||||
|
watchpoint.isReadType(),
|
||||||
|
watchpoint.getWatchExpression(),
|
||||||
|
watchpoint.isEnabled(),
|
||||||
|
watchpoint.getCondition().getIgnoreCount(),
|
||||||
|
watchpoint.getCondition().getExpression(),
|
||||||
|
watchpoint,
|
||||||
|
true );
|
||||||
|
}
|
||||||
|
catch( CDIException e )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
catch( DebugException e )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleBreakpointDestroyedEvent( final ICDIBreakpoint breakpoint )
|
||||||
|
{
|
||||||
|
Runnable runnable = new Runnable()
|
||||||
|
{
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
doHandleBreakpointDestroyedEvent( breakpoint );
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
CDebugCorePlugin.getDefault().asyncExec( runnable );
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void doHandleBreakpointDestroyedEvent( ICDIBreakpoint cdiBreakpoint )
|
||||||
|
{
|
||||||
|
IBreakpoint breakpoint = findBreakpoint( cdiBreakpoint );
|
||||||
|
if ( breakpoint != null )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
DebugPlugin.getDefault().getBreakpointManager().removeBreakpoint( breakpoint, true );
|
||||||
|
}
|
||||||
|
catch( CoreException e )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds and returns the model thread for the associated CDI thread,
|
* Finds and returns the model thread for the associated CDI thread,
|
||||||
* or <code>null</code> if not found.
|
* or <code>null</code> if not found.
|
||||||
|
@ -1615,20 +1748,21 @@ public class CDebugTarget extends CDebugElement
|
||||||
|
|
||||||
private void setLineBreakpoint( ICLineBreakpoint breakpoint ) throws DebugException
|
private void setLineBreakpoint( ICLineBreakpoint breakpoint ) throws DebugException
|
||||||
{
|
{
|
||||||
ICDIBreakpointManager bm = getCDISession().getBreakpointManager();
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ICDILocation location = bm.createLocation( breakpoint.getMarker().getResource().getLocation().lastSegment(), null, breakpoint.getLineNumber() );
|
ICDIBreakpoint cdiBreakpoint = ((CBreakpoint)breakpoint).getExternalBreakpoint();
|
||||||
ICDICondition condition = bm.createCondition( breakpoint.getIgnoreCount(), breakpoint.getCondition() );
|
if ( cdiBreakpoint == null )
|
||||||
ICDIBreakpoint cdiBreakpoint = bm.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, condition, null );
|
{
|
||||||
if ( !getBreakpoints().containsKey( breakpoint ) )
|
setLineBreakpoint0( breakpoint );
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
getBreakpoints().put( breakpoint, cdiBreakpoint );
|
getBreakpoints().put( breakpoint, cdiBreakpoint );
|
||||||
((CBreakpoint)breakpoint).incrementInstallCount();
|
}
|
||||||
if ( !breakpoint.isEnabled() )
|
((CBreakpoint)breakpoint).incrementInstallCount();
|
||||||
{
|
if ( !breakpoint.isEnabled() )
|
||||||
cdiBreakpoint.setEnabled( false );
|
{
|
||||||
}
|
cdiBreakpoint.setEnabled( false );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch( CoreException ce )
|
catch( CoreException ce )
|
||||||
|
@ -1641,22 +1775,32 @@ public class CDebugTarget extends CDebugElement
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setAddressBreakpoint( ICAddressBreakpoint breakpoint ) throws DebugException
|
private synchronized void setLineBreakpoint0( ICLineBreakpoint breakpoint ) throws CDIException, CoreException
|
||||||
{
|
{
|
||||||
ICDIBreakpointManager bm = getCDISession().getBreakpointManager();
|
ICDIBreakpointManager bm = getCDISession().getBreakpointManager();
|
||||||
|
ICDILocation location = bm.createLocation( breakpoint.getMarker().getResource().getLocation().lastSegment(), null, breakpoint.getLineNumber() );
|
||||||
|
ICDICondition condition = bm.createCondition( breakpoint.getIgnoreCount(), breakpoint.getCondition() );
|
||||||
|
ICDIBreakpoint cdiBreakpoint = bm.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, condition, null );
|
||||||
|
getBreakpoints().put( breakpoint, cdiBreakpoint );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setAddressBreakpoint( ICAddressBreakpoint breakpoint ) throws DebugException
|
||||||
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ICDILocation location = bm.createLocation( Long.parseLong( breakpoint.getAddress() ) );
|
ICDIBreakpoint cdiBreakpoint = ((CBreakpoint)breakpoint).getExternalBreakpoint();
|
||||||
ICDICondition condition = bm.createCondition( breakpoint.getIgnoreCount(), breakpoint.getCondition() );
|
if ( cdiBreakpoint == null )
|
||||||
ICDIBreakpoint cdiBreakpoint = bm.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, condition, null );
|
{
|
||||||
if ( !getBreakpoints().containsKey( breakpoint ) )
|
setAddressBreakpoint0( breakpoint );
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
getBreakpoints().put( breakpoint, cdiBreakpoint );
|
getBreakpoints().put( breakpoint, cdiBreakpoint );
|
||||||
((CBreakpoint)breakpoint).incrementInstallCount();
|
}
|
||||||
if ( !breakpoint.isEnabled() )
|
((CBreakpoint)breakpoint).incrementInstallCount();
|
||||||
{
|
if ( !breakpoint.isEnabled() )
|
||||||
cdiBreakpoint.setEnabled( false );
|
{
|
||||||
}
|
cdiBreakpoint.setEnabled( false );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch( CoreException ce )
|
catch( CoreException ce )
|
||||||
|
@ -1673,25 +1817,32 @@ public class CDebugTarget extends CDebugElement
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setWatchpoint( ICWatchpoint watchpoint ) throws DebugException
|
private synchronized void setAddressBreakpoint0( ICAddressBreakpoint breakpoint ) throws CDIException, CoreException
|
||||||
{
|
{
|
||||||
ICDIBreakpointManager bm = getCDISession().getBreakpointManager();
|
ICDIBreakpointManager bm = getCDISession().getBreakpointManager();
|
||||||
|
ICDILocation location = bm.createLocation( Long.parseLong( breakpoint.getAddress() ) );
|
||||||
|
ICDICondition condition = bm.createCondition( breakpoint.getIgnoreCount(), breakpoint.getCondition() );
|
||||||
|
ICDIBreakpoint cdiBreakpoint = bm.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, condition, null );
|
||||||
|
getBreakpoints().put( breakpoint, cdiBreakpoint );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setWatchpoint( ICWatchpoint watchpoint ) throws DebugException
|
||||||
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ICDICondition condition = bm.createCondition( watchpoint.getIgnoreCount(), watchpoint.getCondition() );
|
ICDIWatchpoint cdiWatchpoint = (ICDIWatchpoint)((CWatchpoint)watchpoint).getExternalBreakpoint();
|
||||||
int accessType = 0;
|
if ( cdiWatchpoint == null )
|
||||||
accessType |= ( watchpoint.isWriteType() ) ? ICDIWatchpoint.WRITE : 0;
|
{
|
||||||
accessType |= ( watchpoint.isReadType() ) ? ICDIWatchpoint.READ : 0;
|
setWatchpoint0( watchpoint );
|
||||||
String expression = watchpoint.getExpression();
|
}
|
||||||
ICDIWatchpoint cdiWatchpoint = bm.setWatchpoint( ICDIBreakpoint.REGULAR, accessType, expression, condition );
|
else
|
||||||
if ( !getBreakpoints().containsKey( watchpoint ) )
|
|
||||||
{
|
{
|
||||||
getBreakpoints().put( watchpoint, cdiWatchpoint );
|
getBreakpoints().put( watchpoint, cdiWatchpoint );
|
||||||
((CBreakpoint)watchpoint).incrementInstallCount();
|
}
|
||||||
if ( !watchpoint.isEnabled() )
|
((CBreakpoint)watchpoint).incrementInstallCount();
|
||||||
{
|
if ( !watchpoint.isEnabled() )
|
||||||
cdiWatchpoint.setEnabled( false );
|
{
|
||||||
}
|
cdiWatchpoint.setEnabled( false );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch( CoreException ce )
|
catch( CoreException ce )
|
||||||
|
@ -1704,6 +1855,18 @@ public class CDebugTarget extends CDebugElement
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private synchronized void setWatchpoint0( ICWatchpoint watchpoint ) throws CDIException, CoreException
|
||||||
|
{
|
||||||
|
ICDIBreakpointManager bm = getCDISession().getBreakpointManager();
|
||||||
|
ICDICondition condition = bm.createCondition( watchpoint.getIgnoreCount(), watchpoint.getCondition() );
|
||||||
|
int accessType = 0;
|
||||||
|
accessType |= ( watchpoint.isWriteType() ) ? ICDIWatchpoint.WRITE : 0;
|
||||||
|
accessType |= ( watchpoint.isReadType() ) ? ICDIWatchpoint.READ : 0;
|
||||||
|
String expression = watchpoint.getExpression();
|
||||||
|
ICDIWatchpoint cdiWatchpoint = bm.setWatchpoint( ICDIBreakpoint.REGULAR, accessType, expression, condition );
|
||||||
|
getBreakpoints().put( watchpoint, cdiWatchpoint );
|
||||||
|
}
|
||||||
|
|
||||||
private ICDIBreakpoint findCDIBreakpoint( IBreakpoint breakpoint )
|
private ICDIBreakpoint findCDIBreakpoint( IBreakpoint breakpoint )
|
||||||
{
|
{
|
||||||
return (ICDIBreakpoint)getBreakpoints().get( breakpoint );
|
return (ICDIBreakpoint)getBreakpoints().get( breakpoint );
|
||||||
|
|
|
@ -216,4 +216,34 @@ public class CSourceLocator implements ICSourceLocator
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator#findSourceElement(String)
|
||||||
|
*/
|
||||||
|
public Object findSourceElement( String fileName )
|
||||||
|
{
|
||||||
|
Object result = null;
|
||||||
|
if ( fileName != null && fileName.length() > 0 )
|
||||||
|
{
|
||||||
|
result = findFileByAbsolutePath( fileName );
|
||||||
|
if ( result == null )
|
||||||
|
{
|
||||||
|
ICSourceLocation[] locations = getSourceLocations();
|
||||||
|
for ( int i = 0; i < locations.length; ++i )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
result = locations[i].findSourceElement( fileName );
|
||||||
|
}
|
||||||
|
catch( CoreException e )
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
if ( result != null )
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,4 +190,16 @@ public class CSourceManager implements ICSourceLocator, ISourceMode, IAdaptable
|
||||||
list.add( location );
|
list.add( location );
|
||||||
setSourceLocations( (ICSourceLocation[])list.toArray( new ICSourceLocation[list.size()] ) );
|
setSourceLocations( (ICSourceLocation[])list.toArray( new ICSourceLocation[list.size()] ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator#findSourceElement(String)
|
||||||
|
*/
|
||||||
|
public Object findSourceElement( String fileName )
|
||||||
|
{
|
||||||
|
if ( getCSourceLocator() != null )
|
||||||
|
{
|
||||||
|
return getCSourceLocator().findSourceElement( fileName );
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
2003-01-27 Mikhail Khodjaiants
|
||||||
|
Managing breakpoints from the gdb console.
|
||||||
|
* AddAddressBreakpointActionDelegate.java
|
||||||
|
* ManageBreakpointRulerAction.java
|
||||||
|
* CDebugUIPlugin.java
|
||||||
|
|
||||||
2003-01-23 Mikhail Khodjaiants
|
2003-01-23 Mikhail Khodjaiants
|
||||||
Ignore the text selection when hovering.
|
Ignore the text selection when hovering.
|
||||||
* DebugTextHovering.java
|
* DebugTextHovering.java
|
||||||
|
|
|
@ -71,7 +71,6 @@ public class AddAddressBreakpointActionDelegate extends AbstractListenerActionDe
|
||||||
if ( dialog.open() == dialog.OK )
|
if ( dialog.open() == dialog.OK )
|
||||||
{
|
{
|
||||||
CDebugModel.createAddressBreakpoint( ((IExecFileInfo)getDebugTarget( element ).getAdapter( IExecFileInfo.class )).getExecFile(),
|
CDebugModel.createAddressBreakpoint( ((IExecFileInfo)getDebugTarget( element ).getAdapter( IExecFileInfo.class )).getExecFile(),
|
||||||
-1,
|
|
||||||
parseValue( dialog.getValue().trim() ),
|
parseValue( dialog.getValue().trim() ),
|
||||||
true,
|
true,
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -286,7 +286,7 @@ public class ManageBreakpointRulerAction extends Action implements IUpdate
|
||||||
long address = ((IDisassemblyStorage)editorInput.getStorage()).getAddress( lineNumber );
|
long address = ((IDisassemblyStorage)editorInput.getStorage()).getAddress( lineNumber );
|
||||||
if ( address != 0 && CDebugModel.addressBreakpointExists( resource, address ) == null )
|
if ( address != 0 && CDebugModel.addressBreakpointExists( resource, address ) == null )
|
||||||
{
|
{
|
||||||
CDebugModel.createAddressBreakpoint( resource, lineNumber, address, true, 0, "", true );
|
CDebugModel.createAddressBreakpoint( resource, address, true, 0, "", true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,8 @@ import java.util.Map;
|
||||||
import java.util.MissingResourceException;
|
import java.util.MissingResourceException;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
|
||||||
|
import org.eclipse.cdt.debug.core.IAsyncExecutor;
|
||||||
import org.eclipse.cdt.debug.core.model.ISwitchToFrame;
|
import org.eclipse.cdt.debug.core.model.ISwitchToFrame;
|
||||||
import org.eclipse.cdt.debug.core.model.ISwitchToThread;
|
import org.eclipse.cdt.debug.core.model.ISwitchToThread;
|
||||||
import org.eclipse.cdt.debug.core.sourcelookup.IDisassemblyStorage;
|
import org.eclipse.cdt.debug.core.sourcelookup.IDisassemblyStorage;
|
||||||
|
@ -55,7 +57,10 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||||
/**
|
/**
|
||||||
* The main plugin class to be used in the desktop.
|
* The main plugin class to be used in the desktop.
|
||||||
*/
|
*/
|
||||||
public class CDebugUIPlugin extends AbstractUIPlugin implements ISelectionListener, IDebugEventSetListener
|
public class CDebugUIPlugin extends AbstractUIPlugin
|
||||||
|
implements ISelectionListener,
|
||||||
|
IDebugEventSetListener,
|
||||||
|
IAsyncExecutor
|
||||||
{
|
{
|
||||||
//The shared instance.
|
//The shared instance.
|
||||||
private static CDebugUIPlugin plugin;
|
private static CDebugUIPlugin plugin;
|
||||||
|
@ -313,6 +318,7 @@ public class CDebugUIPlugin extends AbstractUIPlugin implements ISelectionListen
|
||||||
{
|
{
|
||||||
fImageDescriptorRegistry.dispose();
|
fImageDescriptorRegistry.dispose();
|
||||||
}
|
}
|
||||||
|
CDebugCorePlugin.getDefault().setAsyncExecutor( null );
|
||||||
super.shutdown();
|
super.shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -327,6 +333,7 @@ public class CDebugUIPlugin extends AbstractUIPlugin implements ISelectionListen
|
||||||
{
|
{
|
||||||
ww.getSelectionService().addSelectionListener( IDebugUIConstants.ID_DEBUG_VIEW, this );
|
ww.getSelectionService().addSelectionListener( IDebugUIConstants.ID_DEBUG_VIEW, this );
|
||||||
}
|
}
|
||||||
|
CDebugCorePlugin.getDefault().setAsyncExecutor( this );
|
||||||
DebugPlugin.getDefault().addDebugEventListener( this );
|
DebugPlugin.getDefault().addDebugEventListener( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -476,4 +483,16 @@ public class CDebugUIPlugin extends AbstractUIPlugin implements ISelectionListen
|
||||||
fDisassemblyDocumentProvider = new DisassemblyDocumentProvider();
|
fDisassemblyDocumentProvider = new DisassemblyDocumentProvider();
|
||||||
return fDisassemblyDocumentProvider;
|
return fDisassemblyDocumentProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.debug.core.IAsyncExecutor#asyncExec(Runnable)
|
||||||
|
*/
|
||||||
|
public void asyncExec( Runnable runnable )
|
||||||
|
{
|
||||||
|
Display display = getStandardDisplay();
|
||||||
|
if ( display != null )
|
||||||
|
{
|
||||||
|
display.asyncExec( runnable );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue