mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Cleanup.
This commit is contained in:
parent
bf04836b6f
commit
672820b546
2 changed files with 30 additions and 79 deletions
|
@ -1,4 +1,8 @@
|
||||||
2004-12-21 Mikhail Khodjaiants
|
2004-12-23 Mikhail Khodjaiants
|
||||||
|
Cleanup.
|
||||||
|
* CMemoryBlockExtension.java
|
||||||
|
|
||||||
|
2004-12-22 Mikhail Khodjaiants
|
||||||
Fix for bug 75948: Provide "breakpoint type name" for C breakpoints.
|
Fix for bug 75948: Provide "breakpoint type name" for C breakpoints.
|
||||||
Applied patch from Jared Burns.
|
Applied patch from Jared Burns.
|
||||||
* plugin.properties
|
* plugin.properties
|
||||||
|
|
|
@ -67,49 +67,41 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemoryBlock
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.internal.core.memory.IExtendedMemoryBlock#getExpression()
|
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#getExpression()
|
||||||
*/
|
*/
|
||||||
public String getExpression() throws DebugException {
|
public String getExpression() throws DebugException {
|
||||||
return fExpression;
|
return fExpression;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.internal.core.memory.IExtendedMemoryBlock#getBigBaseAddress()
|
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#getBigBaseAddress()
|
||||||
*/
|
*/
|
||||||
public BigInteger getBigBaseAddress() {
|
public BigInteger getBigBaseAddress() {
|
||||||
return fBaseAddress;
|
return fBaseAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.internal.core.memory.IExtendedMemoryBlock#getAddressSize()
|
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#getAddressSize()
|
||||||
*/
|
*/
|
||||||
public int getAddressSize() {
|
public int getAddressSize() {
|
||||||
// TODO need a similar method for IAddress
|
return ((CDebugTarget)getDebugTarget()).getAddressFactory().createAddress( getBigBaseAddress() ).getSize();
|
||||||
return 4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.internal.core.memory.IExtendedMemoryBlock#supportBaseAddressModification()
|
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#supportBaseAddressModification()
|
||||||
*/
|
*/
|
||||||
public boolean supportBaseAddressModification() {
|
public boolean supportBaseAddressModification() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.internal.core.memory.IExtendedMemoryBlock#isMemoryChangesManaged()
|
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#setBaseAddress(java.math.BigInteger)
|
||||||
*/
|
|
||||||
public boolean isMemoryChangesManaged() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.debug.internal.core.memory.IExtendedMemoryBlock#setBaseAddress(java.math.BigInteger)
|
|
||||||
*/
|
*/
|
||||||
public void setBaseAddress( BigInteger address ) throws DebugException {
|
public void setBaseAddress( BigInteger address ) throws DebugException {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.internal.core.memory.IExtendedMemoryBlock#getBytesFromOffset(long, long)
|
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#getBytesFromOffset(long, long)
|
||||||
*/
|
*/
|
||||||
public MemoryByte[] getBytesFromOffset( long offset, long length ) throws DebugException {
|
public MemoryByte[] getBytesFromOffset( long offset, long length ) throws DebugException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
@ -117,7 +109,7 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemoryBlock
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.internal.core.memory.IExtendedMemoryBlock#getBytesFromAddress(java.math.BigInteger, long)
|
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#getBytesFromAddress(java.math.BigInteger, long)
|
||||||
*/
|
*/
|
||||||
public MemoryByte[] getBytesFromAddress( BigInteger address, long length ) throws DebugException {
|
public MemoryByte[] getBytesFromAddress( BigInteger address, long length ) throws DebugException {
|
||||||
ICDIMemoryBlock cdiBlock = getCDIBlock();
|
ICDIMemoryBlock cdiBlock = getCDIBlock();
|
||||||
|
@ -166,7 +158,7 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemoryBlock
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.internal.core.memory.IExtendedMemoryBlock#isBigEndian()
|
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#isBigEndian()
|
||||||
*/
|
*/
|
||||||
public boolean isBigEndian() {
|
public boolean isBigEndian() {
|
||||||
IExecFileInfo info = (IExecFileInfo)getDebugTarget().getAdapter( IExecFileInfo.class );
|
IExecFileInfo info = (IExecFileInfo)getDebugTarget().getAdapter( IExecFileInfo.class );
|
||||||
|
@ -177,58 +169,7 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemoryBlock
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.internal.core.memory.IExtendedMemoryBlock#enable()
|
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#getMemoryBlockRetrieval()
|
||||||
*/
|
|
||||||
public void enable() {
|
|
||||||
ICDIMemoryBlock block = getCDIBlock();
|
|
||||||
if ( block != null ) {
|
|
||||||
block.setFrozen( false );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.debug.internal.core.memory.IExtendedMemoryBlock#disable()
|
|
||||||
*/
|
|
||||||
public void disable() {
|
|
||||||
ICDIMemoryBlock block = getCDIBlock();
|
|
||||||
if ( block != null ) {
|
|
||||||
block.setFrozen( true );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.debug.internal.core.memory.IExtendedMemoryBlock#isEnabled()
|
|
||||||
*/
|
|
||||||
public boolean isEnabled() {
|
|
||||||
ICDIMemoryBlock block = getCDIBlock();
|
|
||||||
if ( block != null ) {
|
|
||||||
return !block.isFrozen();
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.debug.internal.core.memory.IExtendedMemoryBlock#delete()
|
|
||||||
*/
|
|
||||||
public void delete() {
|
|
||||||
fChanges.clear();
|
|
||||||
ICDIMemoryBlock cdiBlock = getCDIBlock();
|
|
||||||
if ( cdiBlock != null ) {
|
|
||||||
try {
|
|
||||||
((CDebugTarget)getDebugTarget()).getCDITarget().removeBlocks( new ICDIMemoryBlock[] {cdiBlock} );
|
|
||||||
}
|
|
||||||
catch( CDIException e ) {
|
|
||||||
CDebugCorePlugin.log( e );
|
|
||||||
}
|
|
||||||
fCDIBlock = null;
|
|
||||||
}
|
|
||||||
getCDISession().getEventManager().removeEventListener( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.debug.internal.core.memory.IExtendedMemoryBlock#getMemoryBlockRetrieval()
|
|
||||||
*/
|
*/
|
||||||
public IMemoryBlockRetrieval getMemoryBlockRetrieval() {
|
public IMemoryBlockRetrieval getMemoryBlockRetrieval() {
|
||||||
return (IMemoryBlockRetrieval)getDebugTarget().getAdapter( IMemoryBlockRetrieval.class );
|
return (IMemoryBlockRetrieval)getDebugTarget().getAdapter( IMemoryBlockRetrieval.class );
|
||||||
|
@ -256,9 +197,7 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemoryBlock
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* (non-Javadoc)
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.debug.core.model.IMemoryBlock#getStartAddress()
|
* @see org.eclipse.debug.core.model.IMemoryBlock#getStartAddress()
|
||||||
*/
|
*/
|
||||||
public long getStartAddress() {
|
public long getStartAddress() {
|
||||||
|
@ -306,6 +245,7 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemoryBlock
|
||||||
|
|
||||||
private ICDIMemoryBlock createCDIBlock( BigInteger address, long length ) throws CDIException {
|
private ICDIMemoryBlock createCDIBlock( BigInteger address, long length ) throws CDIException {
|
||||||
ICDIMemoryBlock block = ((CDebugTarget)getDebugTarget()).getCDITarget().createMemoryBlock( address.toString(), (int)length );
|
ICDIMemoryBlock block = ((CDebugTarget)getDebugTarget()).getCDITarget().createMemoryBlock( address.toString(), (int)length );
|
||||||
|
block.setFrozen( false );
|
||||||
getCDISession().getEventManager().addEventListener( this );
|
getCDISession().getEventManager().addEventListener( this );
|
||||||
return block;
|
return block;
|
||||||
}
|
}
|
||||||
|
@ -400,8 +340,7 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemoryBlock
|
||||||
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#supportsChangeManagement()
|
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#supportsChangeManagement()
|
||||||
*/
|
*/
|
||||||
public boolean supportsChangeManagement() {
|
public boolean supportsChangeManagement() {
|
||||||
// TODO Auto-generated method stub
|
return true;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -409,7 +348,6 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemoryBlock
|
||||||
*/
|
*/
|
||||||
public void connect( Object object ) {
|
public void connect( Object object ) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -417,7 +355,6 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemoryBlock
|
||||||
*/
|
*/
|
||||||
public void disconnect( Object object ) {
|
public void disconnect( Object object ) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -432,8 +369,18 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemoryBlock
|
||||||
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#dispose()
|
* @see org.eclipse.debug.core.model.IMemoryBlockExtension#dispose()
|
||||||
*/
|
*/
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
// TODO Auto-generated method stub
|
fChanges.clear();
|
||||||
|
ICDIMemoryBlock cdiBlock = getCDIBlock();
|
||||||
|
if ( cdiBlock != null ) {
|
||||||
|
try {
|
||||||
|
((CDebugTarget)getDebugTarget()).getCDITarget().removeBlocks( new ICDIMemoryBlock[] {cdiBlock} );
|
||||||
|
}
|
||||||
|
catch( CDIException e ) {
|
||||||
|
CDebugCorePlugin.log( e );
|
||||||
|
}
|
||||||
|
fCDIBlock = null;
|
||||||
|
}
|
||||||
|
getCDISession().getEventManager().removeEventListener( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
Loading…
Add table
Reference in a new issue