mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cleanup.
This commit is contained in:
parent
342ec252d6
commit
07c8819af2
10 changed files with 38 additions and 38 deletions
|
@ -1,3 +1,15 @@
|
||||||
|
2003-11-26 Mikhail Khodjaiants
|
||||||
|
Cleanup.
|
||||||
|
* CDebugModel.java
|
||||||
|
* CDebugUtils.java
|
||||||
|
* CRegisterManager.java
|
||||||
|
* CSharedLibraryManager.java
|
||||||
|
* CSignalManager.java
|
||||||
|
* CUpdateManager.java
|
||||||
|
* CDebugTarget.java
|
||||||
|
* CThread.java
|
||||||
|
* CVariable.java
|
||||||
|
|
||||||
2003-11-10 Mikhail Khodjaiants
|
2003-11-10 Mikhail Khodjaiants
|
||||||
Ensure that all breakpoint creation and modification operations are running in the UI thread.
|
Ensure that all breakpoint creation and modification operations are running in the UI thread.
|
||||||
* CBreakpointManager.java
|
* CBreakpointManager.java
|
||||||
|
|
|
@ -304,9 +304,9 @@ public class CDebugModel
|
||||||
boolean add ) throws DebugException
|
boolean add ) throws DebugException
|
||||||
{
|
{
|
||||||
HashMap attributes = new HashMap( 10 );
|
HashMap attributes = new HashMap( 10 );
|
||||||
attributes.put( ICBreakpoint.ID, getPluginIdentifier() );
|
attributes.put( IBreakpoint.ID, getPluginIdentifier() );
|
||||||
attributes.put( IMarker.LINE_NUMBER, new Integer( lineNumber ) );
|
attributes.put( IMarker.LINE_NUMBER, new Integer( lineNumber ) );
|
||||||
attributes.put( ICBreakpoint.ENABLED, new Boolean( enabled ) );
|
attributes.put( IBreakpoint.ENABLED, new Boolean( enabled ) );
|
||||||
attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
|
attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
|
||||||
attributes.put( ICBreakpoint.CONDITION, condition );
|
attributes.put( ICBreakpoint.CONDITION, condition );
|
||||||
return new CLineBreakpoint( resource, attributes, add );
|
return new CLineBreakpoint( resource, attributes, add );
|
||||||
|
@ -353,13 +353,13 @@ public class CDebugModel
|
||||||
boolean add ) throws DebugException
|
boolean add ) throws DebugException
|
||||||
{
|
{
|
||||||
HashMap attributes = new HashMap( 10 );
|
HashMap attributes = new HashMap( 10 );
|
||||||
attributes.put( ICBreakpoint.ID, getPluginIdentifier() );
|
attributes.put( IBreakpoint.ID, getPluginIdentifier() );
|
||||||
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 ) );
|
||||||
attributes.put( IMarker.LINE_NUMBER, new Integer( -1 ) );
|
attributes.put( IMarker.LINE_NUMBER, new Integer( -1 ) );
|
||||||
attributes.put( ICAddressBreakpoint.ADDRESS, Long.toString( address ) );
|
attributes.put( ICAddressBreakpoint.ADDRESS, Long.toString( address ) );
|
||||||
attributes.put( ICBreakpoint.ENABLED, new Boolean( enabled ) );
|
attributes.put( IBreakpoint.ENABLED, new Boolean( enabled ) );
|
||||||
attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
|
attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
|
||||||
attributes.put( ICBreakpoint.CONDITION, condition );
|
attributes.put( ICBreakpoint.CONDITION, condition );
|
||||||
return new CAddressBreakpoint( resource, attributes, add );
|
return new CAddressBreakpoint( resource, attributes, add );
|
||||||
|
@ -399,7 +399,7 @@ public class CDebugModel
|
||||||
boolean add ) throws DebugException
|
boolean add ) throws DebugException
|
||||||
{
|
{
|
||||||
HashMap attributes = new HashMap( 10 );
|
HashMap attributes = new HashMap( 10 );
|
||||||
attributes.put( ICBreakpoint.ID, getPluginIdentifier() );
|
attributes.put( IBreakpoint.ID, getPluginIdentifier() );
|
||||||
int lineNumber = -1;
|
int lineNumber = -1;
|
||||||
int charStart = -1;
|
int charStart = -1;
|
||||||
int charEnd = -1;
|
int charEnd = -1;
|
||||||
|
@ -423,7 +423,7 @@ public class CDebugModel
|
||||||
attributes.put( IMarker.CHAR_END, new Integer( charEnd ) );
|
attributes.put( IMarker.CHAR_END, new Integer( charEnd ) );
|
||||||
attributes.put( IMarker.LINE_NUMBER, new Integer( lineNumber ) );
|
attributes.put( IMarker.LINE_NUMBER, new Integer( lineNumber ) );
|
||||||
attributes.put( ICFunctionBreakpoint.FUNCTION, CDebugUtils.getFunctionName( function ) );
|
attributes.put( ICFunctionBreakpoint.FUNCTION, CDebugUtils.getFunctionName( function ) );
|
||||||
attributes.put( ICBreakpoint.ENABLED, new Boolean( enabled ) );
|
attributes.put( IBreakpoint.ENABLED, new Boolean( enabled ) );
|
||||||
attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
|
attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
|
||||||
attributes.put( ICBreakpoint.CONDITION, condition );
|
attributes.put( ICBreakpoint.CONDITION, condition );
|
||||||
return new CFunctionBreakpoint( CDebugUtils.getFunctionResource( function ), attributes, add );
|
return new CFunctionBreakpoint( CDebugUtils.getFunctionResource( function ), attributes, add );
|
||||||
|
@ -463,7 +463,7 @@ public class CDebugModel
|
||||||
boolean add ) throws DebugException
|
boolean add ) throws DebugException
|
||||||
{
|
{
|
||||||
HashMap attributes = new HashMap( 10 );
|
HashMap attributes = new HashMap( 10 );
|
||||||
attributes.put( ICBreakpoint.ID, getPluginIdentifier() );
|
attributes.put( IBreakpoint.ID, getPluginIdentifier() );
|
||||||
int lineNumber = -1;
|
int lineNumber = -1;
|
||||||
int charStart = -1;
|
int charStart = -1;
|
||||||
int charEnd = -1;
|
int charEnd = -1;
|
||||||
|
@ -487,7 +487,7 @@ public class CDebugModel
|
||||||
attributes.put( IMarker.CHAR_END, new Integer( charEnd ) );
|
attributes.put( IMarker.CHAR_END, new Integer( charEnd ) );
|
||||||
attributes.put( IMarker.LINE_NUMBER, new Integer( lineNumber ) );
|
attributes.put( IMarker.LINE_NUMBER, new Integer( lineNumber ) );
|
||||||
attributes.put( ICFunctionBreakpoint.FUNCTION, CDebugUtils.getMethodQualifiedName( method ) );
|
attributes.put( ICFunctionBreakpoint.FUNCTION, CDebugUtils.getMethodQualifiedName( method ) );
|
||||||
attributes.put( ICBreakpoint.ENABLED, new Boolean( enabled ) );
|
attributes.put( IBreakpoint.ENABLED, new Boolean( enabled ) );
|
||||||
attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
|
attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
|
||||||
attributes.put( ICBreakpoint.CONDITION, condition );
|
attributes.put( ICBreakpoint.CONDITION, condition );
|
||||||
return new CFunctionBreakpoint( CDebugUtils.getMethodResource( method ), attributes, add );
|
return new CFunctionBreakpoint( CDebugUtils.getMethodResource( method ), attributes, add );
|
||||||
|
@ -528,8 +528,8 @@ public class CDebugModel
|
||||||
boolean add ) throws DebugException
|
boolean add ) throws DebugException
|
||||||
{
|
{
|
||||||
HashMap attributes = new HashMap( 10 );
|
HashMap attributes = new HashMap( 10 );
|
||||||
attributes.put( ICBreakpoint.ID, getPluginIdentifier() );
|
attributes.put( IBreakpoint.ID, getPluginIdentifier() );
|
||||||
attributes.put( ICBreakpoint.ENABLED, new Boolean( enabled ) );
|
attributes.put( IBreakpoint.ENABLED, new Boolean( enabled ) );
|
||||||
attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
|
attributes.put( ICBreakpoint.IGNORE_COUNT, new Integer( ignoreCount ) );
|
||||||
attributes.put( ICBreakpoint.CONDITION, condition );
|
attributes.put( ICBreakpoint.CONDITION, condition );
|
||||||
attributes.put( ICWatchpoint.EXPRESSION, expression );
|
attributes.put( ICWatchpoint.EXPRESSION, expression );
|
||||||
|
|
|
@ -196,14 +196,14 @@ public class CDebugUtils
|
||||||
{
|
{
|
||||||
if ( bytes.length != 8 )
|
if ( bytes.length != 8 )
|
||||||
return 0;
|
return 0;
|
||||||
return (long)Long.parseLong( bytesToString( bytes, le, false ), 16 );
|
return Long.parseLong( bytesToString( bytes, le, false ), 16 );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long toLongLong( char[] bytes, boolean le )
|
public static long toLongLong( char[] bytes, boolean le )
|
||||||
{
|
{
|
||||||
if ( bytes.length != 16 )
|
if ( bytes.length != 16 )
|
||||||
return 0;
|
return 0;
|
||||||
return (long)Long.parseLong( bytesToString( bytes, le, false ), 16 );
|
return Long.parseLong( bytesToString( bytes, le, false ), 16 );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long toUnsignedLongLong( char[] bytes, boolean le )
|
public static long toUnsignedLongLong( char[] bytes, boolean le )
|
||||||
|
|
|
@ -144,7 +144,7 @@ public class CRegisterManager extends CUpdateManager implements ICRegisterManage
|
||||||
{
|
{
|
||||||
if ( getDebugTarget() != null )
|
if ( getDebugTarget() != null )
|
||||||
{
|
{
|
||||||
return ((CDebugTarget)getDebugTarget()).getCDISession().getRegisterManager();
|
return getDebugTarget().getCDISession().getRegisterManager();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,7 +134,7 @@ public class CSharedLibraryManager extends CUpdateManager implements ICSharedLib
|
||||||
{
|
{
|
||||||
if ( getDebugTarget() != null )
|
if ( getDebugTarget() != null )
|
||||||
{
|
{
|
||||||
return ((CDebugTarget)getDebugTarget()).getCDISession().getSharedLibraryManager();
|
return getDebugTarget().getCDISession().getSharedLibraryManager();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,7 @@ public class CSharedLibraryManager extends CUpdateManager implements ICSharedLib
|
||||||
}
|
}
|
||||||
catch( CDIException e )
|
catch( CDIException e )
|
||||||
{
|
{
|
||||||
((CDebugTarget)getDebugTarget()).targetRequestFailed( e.getMessage(), null );
|
getDebugTarget().targetRequestFailed( e.getMessage(), null );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -177,13 +177,13 @@ public class CSharedLibraryManager extends CUpdateManager implements ICSharedLib
|
||||||
}
|
}
|
||||||
catch( CDIException e )
|
catch( CDIException e )
|
||||||
{
|
{
|
||||||
((CDebugTarget)getDebugTarget()).targetRequestFailed( e.getMessage(), null );
|
getDebugTarget().targetRequestFailed( e.getMessage(), null );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setBreakpoints()
|
private void setBreakpoints()
|
||||||
{
|
{
|
||||||
((CDebugTarget)getDebugTarget()).setBreakpoints();
|
getDebugTarget().setBreakpoints();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,11 +47,11 @@ public class CSignalManager extends CUpdateManager implements ICSignalManager
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ICDISignal[] cdiSignals = ((CDebugTarget)getDebugTarget()).getCDISession().getSignalManager().getSignals();
|
ICDISignal[] cdiSignals = getDebugTarget().getCDISession().getSignalManager().getSignals();
|
||||||
ArrayList list = new ArrayList( cdiSignals.length );
|
ArrayList list = new ArrayList( cdiSignals.length );
|
||||||
for ( int i = 0; i < cdiSignals.length; ++i )
|
for ( int i = 0; i < cdiSignals.length; ++i )
|
||||||
{
|
{
|
||||||
list.add( new CSignal( (CDebugTarget)getDebugTarget(), cdiSignals[i] ) );
|
list.add( new CSignal( getDebugTarget(), cdiSignals[i] ) );
|
||||||
}
|
}
|
||||||
fSignals = (ICSignal[])list.toArray( new ICSignal[list.size()] );
|
fSignals = (ICSignal[])list.toArray( new ICSignal[list.size()] );
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ public class CSignalManager extends CUpdateManager implements ICSignalManager
|
||||||
{
|
{
|
||||||
if ( getDebugTarget() != null )
|
if ( getDebugTarget() != null )
|
||||||
{
|
{
|
||||||
return ((CDebugTarget)getDebugTarget()).getCDISession().getSignalManager();
|
return getDebugTarget().getCDISession().getSignalManager();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ public abstract class CUpdateManager implements ICUpdateManager, IAdaptable
|
||||||
}
|
}
|
||||||
catch( CDIException e )
|
catch( CDIException e )
|
||||||
{
|
{
|
||||||
((CDebugTarget)getDebugTarget()).targetRequestFailed( e.getMessage(), null );
|
getDebugTarget().targetRequestFailed( e.getMessage(), null );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,16 +199,6 @@ public class CDebugTarget extends CDebugElement
|
||||||
*/
|
*/
|
||||||
private ICDIConfiguration fConfig;
|
private ICDIConfiguration fConfig;
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether terminate is supported.
|
|
||||||
*/
|
|
||||||
private boolean fSupportsTerminate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether disconnect is supported.
|
|
||||||
*/
|
|
||||||
private boolean fSupportsDisconnect;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The current state identifier.
|
* The current state identifier.
|
||||||
*/
|
*/
|
||||||
|
@ -289,8 +279,6 @@ public class CDebugTarget extends CDebugElement
|
||||||
setCDITarget( cdiTarget );
|
setCDITarget( cdiTarget );
|
||||||
setExecFile( file );
|
setExecFile( file );
|
||||||
setConfiguration( cdiTarget.getSession().getConfiguration() );
|
setConfiguration( cdiTarget.getSession().getConfiguration() );
|
||||||
fSupportsTerminate = allowsTerminate & getConfiguration().supportsTerminate();
|
|
||||||
fSupportsDisconnect = allowsDisconnect & getConfiguration().supportsDisconnect();
|
|
||||||
setThreadList( new ArrayList( 5 ) );
|
setThreadList( new ArrayList( 5 ) );
|
||||||
setDisassemblyManager( new DisassemblyManager( this ) );
|
setDisassemblyManager( new DisassemblyManager( this ) );
|
||||||
setSharedLibraryManager( new CSharedLibraryManager( this ) );
|
setSharedLibraryManager( new CSharedLibraryManager( this ) );
|
||||||
|
@ -351,7 +339,7 @@ public class CDebugTarget extends CDebugElement
|
||||||
public void setBreakpoints()
|
public void setBreakpoints()
|
||||||
{
|
{
|
||||||
IBreakpointManager manager = DebugPlugin.getDefault().getBreakpointManager();
|
IBreakpointManager manager = DebugPlugin.getDefault().getBreakpointManager();
|
||||||
IBreakpoint[] bps = (IBreakpoint[])manager.getBreakpoints( CDebugModel.getPluginIdentifier() );
|
IBreakpoint[] bps = manager.getBreakpoints( CDebugModel.getPluginIdentifier() );
|
||||||
for ( int i = 0; i < bps.length; i++ )
|
for ( int i = 0; i < bps.length; i++ )
|
||||||
{
|
{
|
||||||
if ( bps[i] instanceof ICBreakpoint &&
|
if ( bps[i] instanceof ICBreakpoint &&
|
||||||
|
@ -369,7 +357,7 @@ public class CDebugTarget extends CDebugElement
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
breakpointAdded( (ICBreakpoint)bps[i] );
|
breakpointAdded( bps[i] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -735,7 +735,7 @@ public class CThread extends CDebugElement
|
||||||
CStackFrame frame = (CStackFrame)(((IAdaptable)it.next()).getAdapter( CStackFrame.class ));
|
CStackFrame frame = (CStackFrame)(((IAdaptable)it.next()).getAdapter( CStackFrame.class ));
|
||||||
if ( frame != null )
|
if ( frame != null )
|
||||||
{
|
{
|
||||||
((CStackFrame)frame).dispose();
|
frame.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fStackFrames.clear();
|
fStackFrames.clear();
|
||||||
|
|
|
@ -200,7 +200,7 @@ public abstract class CVariable extends CDebugElement
|
||||||
{
|
{
|
||||||
if ( getCDIVariableObject() instanceof ICDIArgumentObject )
|
if ( getCDIVariableObject() instanceof ICDIArgumentObject )
|
||||||
fCDIVariable = getCDISession().getVariableManager().createArgument( (ICDIArgumentObject)getCDIVariableObject() );
|
fCDIVariable = getCDISession().getVariableManager().createArgument( (ICDIArgumentObject)getCDIVariableObject() );
|
||||||
else if ( getCDIVariableObject() instanceof ICDIVariableObject )
|
else if ( getCDIVariableObject() != null )
|
||||||
fCDIVariable = getCDISession().getVariableManager().createVariable( getCDIVariableObject() );
|
fCDIVariable = getCDISession().getVariableManager().createVariable( getCDIVariableObject() );
|
||||||
}
|
}
|
||||||
catch( CDIException e )
|
catch( CDIException e )
|
||||||
|
@ -667,7 +667,7 @@ public abstract class CVariable extends CDebugElement
|
||||||
*/
|
*/
|
||||||
protected ICDIValue retrieveValue() throws DebugException, CDIException
|
protected ICDIValue retrieveValue() throws DebugException, CDIException
|
||||||
{
|
{
|
||||||
return ( ((IDebugTarget)getParent().getDebugTarget()).isSuspended() && getCDIVariable() != null ) ?
|
return ( getParent().getDebugTarget().isSuspended() && getCDIVariable() != null ) ?
|
||||||
getCDIVariable().getValue() : getLastKnownValue();
|
getCDIVariable().getValue() : getLastKnownValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue