1
/*******************************************************************************
2
* Copyright (c) 2006, 2008 Wind River Systems and others.
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v1.0
5
* which accompanies this distribution, and is available at
6
* http://www.eclipse.org/legal/epl-v10.html
9
* Wind River Systems - initial API and implementation
10
*******************************************************************************/
11
package org.eclipse.cdt.dsf.debug.service;
13
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
14
import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
15
import org.eclipse.cdt.dsf.datamodel.IDMContext;
16
import org.eclipse.cdt.dsf.datamodel.IDMData;
17
import org.eclipse.cdt.dsf.datamodel.IDMEvent;
20
* Service for accessing register data.
24
public interface IRegisters extends IFormattedValues {
27
* Event indicating groups have changed. The type of context returned by this
28
* event is generic, because different implementations of the the register service
29
* could configure register groups using different contexts. Some implementations
30
* could configure different register groups for each execution context, other
31
* services may have a global list of groups.
33
public interface IGroupsChangedDMEvent extends IDMEvent<IDMContext> {}
35
/** Register group context */
36
public interface IRegisterGroupDMContext extends IFormattedDataDMContext {
39
/** Event indicating values for the group have changed. */
40
public interface IGroupChangedDMEvent extends IDMEvent<IRegisterGroupDMContext> {}
42
/** Event indicating registers in a group have changed. */
43
public interface IRegistersChangedDMEvent extends IDMEvent<IRegisterGroupDMContext> {}
46
* Register groups only have a name and description. Sub groups and registers are
47
* retrieved through the service interface.
49
public interface IRegisterGroupDMData extends IDMData {
50
public String getName();
51
public String getDescription();
54
/** Register context */
55
public interface IRegisterDMContext extends IFormattedDataDMContext {
58
/** Event indicating register value changed. */
59
public interface IRegisterChangedDMEvent extends IDMEvent<IRegisterDMContext> {}
61
/** Register information */
62
public interface IRegisterDMData extends IDMData {
64
String getDescription();
67
boolean isWriteable();
68
boolean isWriteOnce();
69
boolean hasSideEffects();
74
/** Bit field context */
75
public interface IBitFieldDMContext extends IFormattedDataDMContext {
78
/** Event indicating register value changed. */
79
public interface IBitFieldChangedDMEvent extends IDMEvent<IBitFieldDMContext> {}
82
* Bitfield data, big groups and mnemonics are retrieved at the same
83
* time as rest of bit field data
85
public interface IBitFieldDMData extends IDMData {
87
String getDescription();
90
boolean isWriteable();
91
boolean isWriteOnce();
92
boolean hasSideEffects();
93
boolean isZeroBasedNumbering();
94
boolean isZeroBitLeftMost();
95
IBitGroup[] getBitGroup();
96
IMnemonic[] getMnemonics();
97
IMnemonic getCurrentMnemonicValue();
100
/** Bit group definition */
101
public interface IBitGroup {
106
/** Bit field mnemonic */
107
public interface IMnemonic {
108
String getShortName();
109
String getLongName();
113
* Retrieves the list of register groups.
114
* @param ctx Context for the returned data.
115
* @param rm Request completion monitor.
117
void getRegisterGroups(IDMContext ctx, DataRequestMonitor<IRegisterGroupDMContext[]> rm);
120
* Retrieves the list of registers for the given context. The given context could include
121
* a register group and an execution context or just an execution context, in which case all
122
* registers for all groups should be returned.
123
* @param ctx Context for the returned data.
124
* @param rm Request completion monitor.
126
void getRegisters(IDMContext ctx, DataRequestMonitor<IRegisterDMContext[]> rm);
129
* Retrieves bit fields for given register
130
* @param ctx Context for the returned data.
131
* @param rm Request completion monitor.
133
void getBitFields(IDMContext ctx, DataRequestMonitor<IBitFieldDMContext[]> rm);
136
* Retrieves a Register Group context. The given context could include a register
137
* group and an execution context or just an execution context.
138
* @param ctx Context for the returned data.
139
* @param name Name of group being requested
140
* @param rm Request completion monitor.
142
void findRegisterGroup(IDMContext ctx, String name, DataRequestMonitor<IRegisterGroupDMContext> rm);
145
* Retrieves a Register context. The given context could include a register group and an execution
146
* context or just an execution context.
147
* @param ctx Context for the returned data.
148
* @param name Name of register being requested
149
* @param rm Request completion monitor.
151
void findRegister(IDMContext ctx, String name, DataRequestMonitor<IRegisterDMContext> rm);
154
* Retrieves bit field context. The given context could include a register and an execution
155
* context or just an execution context.
156
* @param ctx Context for the returned data.
157
* @param name Name of bit field being requested
158
* @param rm Request completion monitor.
160
void findBitField(IDMContext ctx, String name, DataRequestMonitor<IBitFieldDMContext> rm);
163
* Retrieves register group data for given context.
164
* @param dmc Context to retrieve data for.
165
* @param rm Request completion monitor.
167
void getRegisterGroupData(IRegisterGroupDMContext dmc, DataRequestMonitor<IRegisterGroupDMData> rm);
170
* Retrieves register data for given context.
171
* @param dmc Context to retrieve data for.
172
* @param rm Request completion monitor.
174
void getRegisterData(IRegisterDMContext dmc , DataRequestMonitor<IRegisterDMData> rm);
177
* Retrieves bit field data for given context.
178
* @param dmc Context to retrieve data for.
179
* @param rm Request completion monitor.
181
void getBitFieldData(IBitFieldDMContext dmc , DataRequestMonitor<IBitFieldDMData> rm);
186
* Writes a register value for a given register to the target
187
* @param regCtx Context containing the register.
188
* @param regValue Value of the register to be written.
189
* @param formatId Format of the value to be written.
190
* @param rm Request completion monitor.
192
void writeRegister(IRegisterDMContext regCtx, String regValue, String formatId, RequestMonitor rm);
195
* Writes a bit field value for a given bit field to the target
196
* @param bitFieldCtx Context containing the bit field.
197
* @param bitFieldValue Value of the bit field to be written.
198
* @param formatId Format of the value to be written.
199
* @param rm Request completion monitor.
201
void writeBitField(IBitFieldDMContext bitFieldCtx, String bitFieldValue, String formatId, RequestMonitor rm);
204
* Writes a bit field value for a given bit field to the target
205
* @param bitFieldCtx Context containing the bit field.
206
* @param mnemonic Mnemonic which represents the value to be written.
207
* @param rm Request completion monitor.
209
void writeBitField(IBitFieldDMContext bitFieldCtx, IMnemonic mnemonic, RequestMonitor rm);