let expression getAddress() return a string, such as register name or invalid access message
--- a/cdt/cdt_6_0_x/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIMemory.java Thu Oct 15 15:38:06 2009 -0500
+++ b/cdt/cdt_6_0_x/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIMemory.java Fri Oct 30 10:27:11 2009 -0500
@@ -440,12 +440,14 @@
// Figure out which memory area was modified
IExpressionDMAddress expression = getData();
final int count = expression.getSize();
- IAddress expAddress = expression.getAddress();
+ Object expAddress = expression.getAddress();
final Addr64 address;
if (expAddress instanceof Addr64)
address = (Addr64) expAddress;
+ else if (expAddress instanceof IAddress)
+ address = new Addr64(((IAddress)expAddress).getValue());
else
- address = new Addr64(expAddress.getValue());
+ return; // not a valid memory address
final IMemoryDMContext memoryDMC = DMContexts.getAncestorOfType(context, IMemoryDMContext.class);
getMemoryCache(memoryDMC).refreshMemory(memoryDMC, address, 0, 1, count,
--- a/cdt/cdt_6_0_x/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableVMNode.java Thu Oct 15 15:38:06 2009 -0500
+++ b/cdt/cdt_6_0_x/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableVMNode.java Fri Oct 30 10:27:11 2009 -0500
@@ -707,8 +707,15 @@
protected void fillAddressDataProperties(IPropertiesUpdate update, IExpressionDMAddress address)
{
IExpressionDMAddress expression = address;
- IAddress expAddress = expression.getAddress();
- update.setProperty(PROP_VARIABLE_ADDRESS, "0x" + expAddress.toString(16)); //$NON-NLS-1$
+ Object expAddress = expression.getAddress();
+
+ String addrString = ""; //$NON-NLS-1$
+ if (expAddress instanceof IAddress)
+ addrString = "0x" + ((IAddress)expAddress).toString(16); //$NON-NLS-1$
+ else if (expAddress instanceof String)
+ addrString = (String)expAddress;
+
+ update.setProperty(PROP_VARIABLE_ADDRESS, addrString);
}
public CellEditor getCellEditor(IPresentationContext context, String columnId, Object element, Composite parent) {
--- a/cdt/cdt_6_0_x/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IExpressions.java Thu Oct 15 15:38:06 2009 -0500
+++ b/cdt/cdt_6_0_x/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IExpressions.java Fri Oct 30 10:27:11 2009 -0500
@@ -13,7 +13,6 @@
import java.util.Map;
-import org.eclipse.cdt.core.IAddress;
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
import org.eclipse.cdt.dsf.datamodel.IDMContext;
@@ -46,7 +45,7 @@
* The address and size of an expression.
*/
public interface IExpressionDMAddress {
- IAddress getAddress();
+ Object getAddress();
int getSize();
}