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:
parent
6847c2c2eb
commit
dc3e238402
3 changed files with 32 additions and 0 deletions
|
@ -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])) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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])) {
|
||||
|
|
Loading…
Add table
Reference in a new issue