mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bugzilla defect 190091.
This commit is contained in:
parent
30dbfc7ced
commit
1f71a2fac3
4 changed files with 23 additions and 36 deletions
|
@ -29,9 +29,7 @@ import org.eclipse.dd.dsf.debug.service.IRegisters.IBitFieldDMContext;
|
|||
import org.eclipse.dd.dsf.debug.service.IRegisters.IBitFieldDMData;
|
||||
import org.eclipse.dd.dsf.debug.service.IRegisters.IMnemonic;
|
||||
import org.eclipse.dd.dsf.debug.service.IRegisters.IRegisterDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IRegisters.IRegisterDMData;
|
||||
import org.eclipse.dd.dsf.debug.service.IRegisters.IRegisterGroupDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IRegisters.IRegisterGroupDMData;
|
||||
import org.eclipse.dd.dsf.debug.service.IRunControl.ISuspendedDMEvent;
|
||||
import org.eclipse.dd.dsf.debug.ui.DsfDebugUIPlugin;
|
||||
import org.eclipse.dd.dsf.debug.ui.viewmodel.IDebugVMConstants;
|
||||
|
@ -137,32 +135,23 @@ public class RegisterBitFieldLayoutNode extends AbstractExpressionLayoutNode<IBi
|
|||
IRegisterGroupDMContext groupDmc =
|
||||
DMContexts.getAncestorOfType(bitFieldVmc.getDMC(), IRegisterGroupDMContext.class);
|
||||
if (groupDmc != null) {
|
||||
IRegisterGroupDMData groupData = fDataAccess.readRegisterGroup(groupDmc);
|
||||
if (groupData != null) {
|
||||
exprBuf.append("$$\""); //$NON-NLS-1$
|
||||
exprBuf.append(groupData.getName());
|
||||
exprBuf.append('"');
|
||||
}
|
||||
exprBuf.append("$$\""); //$NON-NLS-1$
|
||||
exprBuf.append(groupDmc.getName());
|
||||
exprBuf.append('"');
|
||||
}
|
||||
|
||||
IRegisterDMContext registerDmc =
|
||||
DMContexts.getAncestorOfType(bitFieldVmc.getDMC(), IRegisterDMContext.class);
|
||||
if (registerDmc != null) {
|
||||
IRegisterDMData regData = fDataAccess.readRegister(registerDmc);
|
||||
if (regData != null) {
|
||||
exprBuf.append('$');
|
||||
exprBuf.append(regData.getName());
|
||||
}
|
||||
exprBuf.append('$');
|
||||
exprBuf.append(registerDmc.getName());
|
||||
}
|
||||
|
||||
IBitFieldDMContext bitFieldDmc =
|
||||
DMContexts.getAncestorOfType(bitFieldVmc.getDMC(), IBitFieldDMContext.class);
|
||||
if (bitFieldDmc != null) {
|
||||
IBitFieldDMData bitFieldData = fDataAccess.readBitField(bitFieldDmc);
|
||||
if (bitFieldData != null) {
|
||||
exprBuf.append('.');
|
||||
exprBuf.append(bitFieldData.getName());
|
||||
}
|
||||
exprBuf.append('.');
|
||||
exprBuf.append(bitFieldDmc.getName());
|
||||
}
|
||||
|
||||
return exprBuf.toString();
|
||||
|
|
|
@ -124,10 +124,9 @@ public class RegisterGroupLayoutNode extends AbstractExpressionLayoutNode<IRegis
|
|||
StringBuffer exprBuf = new StringBuffer();
|
||||
IRegisterGroupDMContext groupDmc =
|
||||
DMContexts.getAncestorOfType(registerVmc.getDMC(), IRegisterGroupDMContext.class);
|
||||
IRegisterGroupDMData groupData = fSyncRegisterDataAccess.readRegisterGroup(groupDmc);
|
||||
if (groupData != null) {
|
||||
if (groupDmc != null) {
|
||||
exprBuf.append("$$\""); //$NON-NLS-1$
|
||||
exprBuf.append(groupData.getName());
|
||||
exprBuf.append(groupDmc.getName());
|
||||
exprBuf.append('"');
|
||||
return exprBuf.toString();
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@ import org.eclipse.dd.dsf.debug.service.IRegisters.IRegisterChangedDMEvent;
|
|||
import org.eclipse.dd.dsf.debug.service.IRegisters.IRegisterDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IRegisters.IRegisterDMData;
|
||||
import org.eclipse.dd.dsf.debug.service.IRegisters.IRegisterGroupDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IRegisters.IRegisterGroupDMData;
|
||||
import org.eclipse.dd.dsf.debug.ui.DsfDebugUIPlugin;
|
||||
import org.eclipse.dd.dsf.debug.ui.viewmodel.IDebugVMConstants;
|
||||
import org.eclipse.dd.dsf.debug.ui.viewmodel.expression.AbstractExpressionLayoutNode;
|
||||
|
@ -134,20 +133,16 @@ public class RegisterLayoutNode extends AbstractExpressionLayoutNode<IRegisterDM
|
|||
IRegisterGroupDMContext groupDmc =
|
||||
DMContexts.getAncestorOfType(registerVmc.getDMC(), IRegisterGroupDMContext.class);
|
||||
if (groupDmc != null) {
|
||||
IRegisterGroupDMData groupData = fSyncRegisterDataAccess.readRegisterGroup(groupDmc);
|
||||
if (groupData != null) {
|
||||
exprBuf.append("$$\""); //$NON-NLS-1$
|
||||
exprBuf.append(groupData.getName());
|
||||
exprBuf.append('"');
|
||||
}
|
||||
exprBuf.append("$$\""); //$NON-NLS-1$
|
||||
exprBuf.append(groupDmc.getName());
|
||||
exprBuf.append('"');
|
||||
}
|
||||
|
||||
IRegisterDMContext registerDmc =
|
||||
DMContexts.getAncestorOfType(registerVmc.getDMC(), IRegisterDMContext.class);
|
||||
IRegisterDMData regData = fSyncRegisterDataAccess.readRegister(registerDmc);
|
||||
if (regData != null) {
|
||||
if (registerDmc != null) {
|
||||
exprBuf.append('$');
|
||||
exprBuf.append(regData.getName());
|
||||
exprBuf.append(registerDmc.getName());
|
||||
return exprBuf.toString();
|
||||
}
|
||||
|
||||
|
@ -178,8 +173,6 @@ public class RegisterLayoutNode extends AbstractExpressionLayoutNode<IRegisterDM
|
|||
{
|
||||
final IRegisters regService = getServicesTracker().getService(IRegisters.class);
|
||||
/*
|
||||
* PREFPAGE : We are using a default format until the preference page is created
|
||||
*
|
||||
* First select the format to be used. This involves checking so see that the preference
|
||||
* page format is supported by the register service. If the format is not supported then
|
||||
* we will pick the first available format.
|
||||
|
|
|
@ -25,7 +25,9 @@ public interface IRegisters extends IFormattedValues {
|
|||
public interface IGroupsChangedDMEvent extends IDMEvent<IRunControl.IExecutionDMContext> {}
|
||||
|
||||
/** Register group context */
|
||||
public interface IRegisterGroupDMContext extends IFormattedDataDMContext<IRegisterGroupDMData> {}
|
||||
public interface IRegisterGroupDMContext extends IFormattedDataDMContext<IRegisterGroupDMData> {
|
||||
public String getName();
|
||||
}
|
||||
|
||||
/** Event indicating registers in a group have changed. */
|
||||
public interface IRegistersChangedDMEvent extends IDMEvent<IRegisterGroupDMContext> {}
|
||||
|
@ -40,7 +42,9 @@ public interface IRegisters extends IFormattedValues {
|
|||
}
|
||||
|
||||
/** Register context */
|
||||
public interface IRegisterDMContext extends IFormattedDataDMContext<IRegisterDMData> {}
|
||||
public interface IRegisterDMContext extends IFormattedDataDMContext<IRegisterDMData> {
|
||||
public String getName();
|
||||
}
|
||||
|
||||
/** Event indicating register value changed. */
|
||||
public interface IRegisterChangedDMEvent extends IDMEvent<IRegisterDMContext> {}
|
||||
|
@ -59,7 +63,9 @@ public interface IRegisters extends IFormattedValues {
|
|||
}
|
||||
|
||||
/** Bit field context */
|
||||
public interface IBitFieldDMContext extends IFormattedDataDMContext<IBitFieldDMData> {}
|
||||
public interface IBitFieldDMContext extends IFormattedDataDMContext<IBitFieldDMData> {
|
||||
public String getName();
|
||||
}
|
||||
|
||||
/** Event indicating register value changed. */
|
||||
public interface IBitFieldChangedDMEvent extends IDMEvent<IBitFieldDMContext> {}
|
||||
|
|
Loading…
Add table
Reference in a new issue