mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Use the new "createAddress" method of "IAddressFactory".
This commit is contained in:
parent
bab0c22d3a
commit
4989ad3e7a
7 changed files with 23 additions and 10 deletions
|
@ -1,3 +1,12 @@
|
|||
2004-09-29 Mikhail Khodjaiants
|
||||
Use the new "createAddress(BigInteger)" method of "IAddressFactory".
|
||||
* CBreakpointManager.java
|
||||
* AsmInstruction.java
|
||||
* CFormattedMemoryBlock.java
|
||||
* CSharedLibrary.java
|
||||
* CStackFrame.java
|
||||
* CValue.java
|
||||
|
||||
2004-09-28 Mikhail Khodjaiants
|
||||
Synchronize the "getType" method of "CVariable.InternalVariable".
|
||||
* CVariable.java
|
||||
|
|
|
@ -268,7 +268,7 @@ public class CBreakpointManager implements IBreakpointManagerListener, ICDIEvent
|
|||
ICDILocation location = ((ICDILocationBreakpoint)cdiBreakpoint).getLocation();
|
||||
if ( location != null ) {
|
||||
IAddressFactory factory = getDebugTarget().getAddressFactory();
|
||||
return factory.createAddress( location.getAddress().toString() );
|
||||
return factory.createAddress( location.getAddress() );
|
||||
}
|
||||
}
|
||||
catch( CDIException e ) {
|
||||
|
@ -630,7 +630,7 @@ public class CBreakpointManager implements IBreakpointManagerListener, ICDIEvent
|
|||
private ICAddressBreakpoint createAddressBreakpoint( ICDILocationBreakpoint cdiBreakpoint ) throws CDIException, CoreException {
|
||||
IFile execFile = getExecFile();
|
||||
String sourceHandle = execFile.getFullPath().toOSString();
|
||||
IAddress address = getDebugTarget().getAddressFactory().createAddress( cdiBreakpoint.getLocation().getAddress().toString() );
|
||||
IAddress address = getDebugTarget().getAddressFactory().createAddress( cdiBreakpoint.getLocation().getAddress() );
|
||||
ICAddressBreakpoint breakpoint = CDIDebugModel.createAddressBreakpoint( sourceHandle,
|
||||
execFile,
|
||||
address,
|
||||
|
|
|
@ -29,7 +29,7 @@ public class AsmInstruction implements IAsmInstruction {
|
|||
*/
|
||||
public AsmInstruction( IAddressFactory factory, ICDIInstruction cdiInstruction ) {
|
||||
fCDIInstruction = cdiInstruction;
|
||||
fAddress = factory.createAddress( cdiInstruction.getAdress().toString() );
|
||||
fAddress = factory.createAddress( cdiInstruction.getAdress() );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -296,7 +296,7 @@ public class CFormattedMemoryBlock extends CDebugElement
|
|||
IAddressFactory factory = ((CDebugTarget)getDebugTarget()).getAddressFactory();
|
||||
if ( fCDIMemoryBlock != null )
|
||||
{
|
||||
return factory.createAddress( fCDIMemoryBlock.getStartAddress().toString() );
|
||||
return factory.createAddress( fCDIMemoryBlock.getStartAddress() );
|
||||
}
|
||||
return factory.getZero();
|
||||
}
|
||||
|
@ -506,7 +506,7 @@ public class CFormattedMemoryBlock extends CDebugElement
|
|||
BigInteger[] bigs = event.getAddresses();
|
||||
IAddress[] addresses = new IAddress[bigs.length];
|
||||
for (int i = 0; i < addresses.length; ++i) {
|
||||
addresses[i] = factory.createAddress( bigs[i].toString() );
|
||||
addresses[i] = factory.createAddress( bigs[i] );
|
||||
}
|
||||
setChangedAddresses( addresses );
|
||||
fireChangeEvent( DebugEvent.CONTENT );
|
||||
|
|
|
@ -58,7 +58,7 @@ public class CSharedLibrary extends CDebugElement
|
|||
{
|
||||
IAddressFactory factory = ((CDebugTarget)getDebugTarget()).getAddressFactory();
|
||||
if ( getCDISharedLibrary() != null )
|
||||
return factory.createAddress(getCDISharedLibrary().getStartAddress().toString());
|
||||
return factory.createAddress( getCDISharedLibrary().getStartAddress() );
|
||||
return factory.getZero();
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ public class CSharedLibrary extends CDebugElement
|
|||
{
|
||||
IAddressFactory factory = ((CDebugTarget)getDebugTarget()).getAddressFactory();
|
||||
if ( getCDISharedLibrary() != null )
|
||||
return factory.createAddress(getCDISharedLibrary().getEndAddress().toString());
|
||||
return factory.createAddress( getCDISharedLibrary().getEndAddress() );
|
||||
return factory.getZero();
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ import org.eclipse.cdt.debug.internal.core.CExpressionTarget;
|
|||
import org.eclipse.cdt.debug.internal.core.CGlobalVariableManager;
|
||||
import org.eclipse.core.runtime.IAdaptable;
|
||||
import org.eclipse.debug.core.DebugException;
|
||||
import org.eclipse.debug.core.model.IMemoryBlockRetrieval;
|
||||
import org.eclipse.debug.core.model.IRegisterGroup;
|
||||
import org.eclipse.debug.core.model.ISourceLocator;
|
||||
import org.eclipse.debug.core.model.IStackFrame;
|
||||
|
@ -469,6 +470,9 @@ public class CStackFrame extends CDebugElement implements ICStackFrame, IRestart
|
|||
if ( adapter == ICDIStackFrame.class ) {
|
||||
return getCDIStackFrame();
|
||||
}
|
||||
if ( adapter == IMemoryBlockRetrieval.class ) {
|
||||
return getDebugTarget().getAdapter( adapter );
|
||||
}
|
||||
return super.getAdapter( adapter );
|
||||
}
|
||||
|
||||
|
@ -534,7 +538,7 @@ public class CStackFrame extends CDebugElement implements ICStackFrame, IRestart
|
|||
*/
|
||||
public IAddress getAddress() {
|
||||
IAddressFactory factory = ((CDebugTarget)getDebugTarget()).getAddressFactory();
|
||||
return factory.createAddress( getCDIStackFrame().getLocation().getAddress().toString() );
|
||||
return factory.createAddress( getCDIStackFrame().getLocation().getAddress() );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -354,7 +354,7 @@ public class CValue extends AbstractCValue {
|
|||
private String getPointerValueString( ICDIPointerValue value ) throws CDIException {
|
||||
//TODO:IPF_TODO Workaround to solve incorrect handling of structures referenced by pointers or references
|
||||
IAddressFactory factory = ((CDebugTarget)getDebugTarget()).getAddressFactory();
|
||||
IAddress address = factory.createAddress( value.pointerValue().toString() );
|
||||
IAddress address = factory.createAddress( value.pointerValue() );
|
||||
if ( address == null )
|
||||
return ""; //$NON-NLS-1$
|
||||
CVariableFormat format = getParentVariable().getFormat();
|
||||
|
@ -372,7 +372,7 @@ public class CValue extends AbstractCValue {
|
|||
BigInteger refValue = value.referenceValue();
|
||||
if ( refValue == null )
|
||||
return ""; //$NON-NLS-1$
|
||||
IAddress address = factory.createAddress( refValue.toString() );
|
||||
IAddress address = factory.createAddress( refValue );
|
||||
if ( address == null )
|
||||
return ""; //$NON-NLS-1$
|
||||
CVariableFormat format = getParentVariable().getFormat();
|
||||
|
|
Loading…
Add table
Reference in a new issue