summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlvaro Sanchez-Leon2013-09-27 09:07:48 (EDT)
committerMarc Khouzam2013-09-29 22:39:23 (EDT)
commit4eb628b862856c760efd415b9ac2ec06ade70cf8 (patch)
treeaab7f7e1adc9933b2ce84cbd0d2788c98ca5030e
parent360577311ba0f27defba27ed581b41134354c95f (diff)
downloadorg.eclipse.cdt-4eb628b862856c760efd415b9ac2ec06ade70cf8.zip
org.eclipse.cdt-4eb628b862856c760efd415b9ac2ec06ade70cf8.tar.gz
org.eclipse.cdt-4eb628b862856c760efd415b9ac2ec06ade70cf8.tar.bz2
Bug 418176 - Register view does not refresh register names per processrefs/changes/37/16837/3
Change-Id: I656593bb655d3a384fbcc179ca77e81c9f804f8a Signed-off-by: Alvaro Sanchez-Leon <alvsan09@gmail.com> Reviewed-on: https://git.eclipse.org/r/16837 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.java18
1 files changed, 14 insertions, 4 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 817438d..e0239b8 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
@@ -10,12 +10,15 @@
* Ericsson - Modified for additional features in DSF Reference Implementation
* Roland Grunberg (RedHat) - Refresh all registers once one is changed (Bug 400840)
* Alvaro Sanchez-Leon (Ericsson) - Make Registers View specific to a frame (Bug 323552)
+ * Alvaro Sanchez-Leon (Ericsson) - Register view does not refresh register names per process (Bug 418176)
*******************************************************************************/
package org.eclipse.cdt.dsf.mi.service;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Hashtable;
import java.util.List;
+import java.util.Map;
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
import org.eclipse.cdt.dsf.concurrent.ImmediateDataRequestMonitor;
@@ -175,7 +178,8 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
private CommandFactory fCommandFactory;
- private MIRegisterGroupDMC fGeneralRegistersGroupDMC;
+ //One Group per container process
+ private final Map<IContainerDMContext, MIRegisterGroupDMC> fContainerToGroupMap = new HashMap<IContainerDMContext, MIRegisterGroupDMC>();
private CommandCache fRegisterNameCache; // Cache for holding the Register Names in the single Group
private CommandCache fRegisterValueCache; // Cache for holding the Register Values
@@ -519,10 +523,16 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
return;
}
- if (fGeneralRegistersGroupDMC == null) {
- fGeneralRegistersGroupDMC = new MIRegisterGroupDMC( this , contDmc, 0 , "General Registers" ) ; //$NON-NLS-1$
+ //Bug 418176
+ //Only one group per Process (container) is supported for the time being
+ MIRegisterGroupDMC registerGroup = fContainerToGroupMap.get(contDmc);
+
+ if (registerGroup == null) {
+ registerGroup = new MIRegisterGroupDMC( this , contDmc, 0 , "General Registers" ) ; //$NON-NLS-1$
+ fContainerToGroupMap.put(contDmc, registerGroup);
}
- MIRegisterGroupDMC[] groupDMCs = new MIRegisterGroupDMC[] { fGeneralRegistersGroupDMC };
+
+ MIRegisterGroupDMC[] groupDMCs = new MIRegisterGroupDMC[] { registerGroup };
rm.setData(groupDMCs) ;
rm.done() ;
}