Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Grunberg2013-05-22 15:07:24 +0000
committerMarc Khouzam2013-05-23 20:07:42 +0000
commitf116c7235d719a586765d65fca78e66a217f85c3 (patch)
tree3ffdee06f7d369061522d438127f78b48943a9b3
parentef7967342a8232124e242f397da79c2d12537812 (diff)
downloadorg.eclipse.cdt-f116c7235d719a586765d65fca78e66a217f85c3.tar.gz
org.eclipse.cdt-f116c7235d719a586765d65fca78e66a217f85c3.tar.xz
org.eclipse.cdt-f116c7235d719a586765d65fca78e66a217f85c3.zip
Bug 400840 - Update 'Registers' view values when modified.
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 2931117ad58..cb2cbd4d9b3 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());
+ }
+
}
/*

Back to the top