1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 15:15:25 +02:00

Bugzilla 200566 - providing type and attribute information for registers and bitfields in the expressions view.

This commit is contained in:
Randy Rohrbach 2007-08-20 15:25:39 +00:00
parent 6847c2c2eb
commit dc3e238402
3 changed files with 32 additions and 0 deletions

View file

@ -323,6 +323,20 @@ public class RegisterBitFieldLayoutNode extends AbstractExpressionLayoutNode<IBi
update.setLabel(getData().getName(), idx);
} else if (IDebugVMConstants.COLUMN_ID__VALUE.equals(localColumns[idx])) {
weAreExtractingFormattedData = true;
} else if (IDebugVMConstants.COLUMN_ID__TYPE.equals(localColumns[idx])) {
IBitFieldDMData data = getData();
String typeStr = "Unsigned"; //$NON-NLS-1$
String ReadAttrStr = "ReadNone"; //$NON-NLS-1$
String WriteAddrStr = "WriteNone"; //$NON-NLS-1$
if ( data.isReadOnce() ) { ReadAttrStr = "ReadOnce"; } //$NON-NLS-1$
else if ( data.isReadable() ) { ReadAttrStr = "Readable"; } //$NON-NLS-1$
if ( data.isReadOnce() ) { WriteAddrStr = "WriteOnce"; } //$NON-NLS-1$
else if ( data.isReadable() ) { WriteAddrStr = "Writeable"; } //$NON-NLS-1$
typeStr += " - " + ReadAttrStr + "/" + WriteAddrStr; //$NON-NLS-1$ //$NON-NLS-2$
update.setLabel(typeStr, idx);
} else if (IDebugVMConstants.COLUMN_ID__DESCRIPTION.equals(localColumns[idx])) {
update.setLabel(getData().getDescription(), idx);
} else if (IDebugVMConstants.COLUMN_ID__EXPRESSION.equals(localColumns[idx])) {

View file

@ -189,6 +189,8 @@ public class RegisterGroupLayoutNode extends AbstractExpressionLayoutNode<IRegis
update.setLabel("", idx); //$NON-NLS-1$
} else if (IDebugVMConstants.COLUMN_ID__DESCRIPTION.equals(columnId)) {
update.setLabel(dmData.getDescription(), idx);
} else if (IDebugVMConstants.COLUMN_ID__TYPE.equals(columnId)) {
update.setLabel("", idx); //$NON-NLS-1$
} else if (IDebugVMConstants.COLUMN_ID__EXPRESSION.equals(columnId)) {
IVMContext vmc = (IVMContext)update.getElement();
IExpression expression = (IExpression)vmc.getAdapter(IExpression.class);

View file

@ -324,6 +324,22 @@ public class RegisterLayoutNode extends AbstractExpressionLayoutNode<IRegisterDM
update.setImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_OBJS_REGISTER), idx);
} else if (IDebugVMConstants.COLUMN_ID__VALUE.equals(localColumns[idx])) {
weAreExtractingFormattedData = true;
} else if (IDebugVMConstants.COLUMN_ID__TYPE.equals(localColumns[idx])) {
IRegisterDMData data = getData();
String typeStr = "Unsigned"; //$NON-NLS-1$
String ReadAttrStr = "ReadNone"; //$NON-NLS-1$
String WriteAddrStr = "WriteNone"; //$NON-NLS-1$
if ( data.isFloat() ) { typeStr = "Floating Point"; } //$NON-NLS-1$
if ( data.isReadOnce() ) { ReadAttrStr = "ReadOnce"; } //$NON-NLS-1$
else if ( data.isReadable() ) { ReadAttrStr = "Readable"; } //$NON-NLS-1$
if ( data.isReadOnce() ) { WriteAddrStr = "WriteOnce"; } //$NON-NLS-1$
else if ( data.isReadable() ) { WriteAddrStr = "Writeable"; } //$NON-NLS-1$
typeStr += " - " + ReadAttrStr + "/" + WriteAddrStr; //$NON-NLS-1$ //$NON-NLS-2$
update.setLabel(typeStr, idx);
} else if (IDebugVMConstants.COLUMN_ID__DESCRIPTION.equals(localColumns[idx])) {
update.setLabel(getData().getDescription(), idx);
} else if (IDebugVMConstants.COLUMN_ID__EXPRESSION.equals(localColumns[idx])) {