summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Grunberg2013-05-22 11:07:24 (EDT)
committerMarc Khouzam2013-05-23 16:07:42 (EDT)
commitf116c7235d719a586765d65fca78e66a217f85c3 (patch)
tree3ffdee06f7d369061522d438127f78b48943a9b3
parentef7967342a8232124e242f397da79c2d12537812 (diff)
downloadorg.eclipse.cdt-f116c7235d719a586765d65fca78e66a217f85c3.zip
org.eclipse.cdt-f116c7235d719a586765d65fca78e66a217f85c3.tar.gz
org.eclipse.cdt-f116c7235d719a586765d65fca78e66a217f85c3.tar.bz2
Bug 400840 - Update 'Registers' view values when modified.refs/changes/84/13084/3
Change-Id: I9539496e4a368721b0bb9b34789461cbd8167f6e Reviewed-on: https://git.eclipse.org/r/13084 Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com> IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com> Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRegisters.java20
1 files changed, 19 insertions, 1 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRegisters.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRegisters.java
index 2931117..cb2cbd4 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRegisters.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRegisters.java
@@ -8,6 +8,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
* Ericsson - Modified for additional features in DSF Reference Implementation
+ * Roland Grunberg (RedHat) - Refresh all registers once one is changed (Bug 400840)
*******************************************************************************/
package org.eclipse.cdt.dsf.mi.service;
@@ -449,8 +450,25 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
fRegisterValueCache.reset();
}
- private void generateRegisterChangedEvent(IRegisterDMContext dmc ) {
+ private void generateRegisterChangedEvent(final IRegisterDMContext dmc ) {
getSession().dispatchEvent(new RegisterChangedDMEvent(dmc), getProperties());
+
+ // Temporary fix for Bug 400840
+ // When one register is modified, it could affect other registers.
+ // To properly reflect that, we send a change for all registers.
+ // We cheat since we know there is currently only one group. Once we handle
+ // more groups, this may not work properly.
+ final IRegisterGroupDMContext groupDmc = DMContexts.getAncestorOfType(dmc, IRegisterGroupDMContext.class);
+ if (groupDmc != null) {
+ IRegistersChangedDMEvent event = new IRegistersChangedDMEvent() {
+ @Override
+ public IRegisterGroupDMContext getDMContext() {
+ return groupDmc;
+ }
+ };
+ getSession().dispatchEvent(event, getProperties());
+ }
+
}
/*