Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2011-06-23 13:27:48 -0400
committereutarass2011-06-23 13:27:48 -0400
commit0dca60bde34a25fef299272ffbcbed69eb8d56c7 (patch)
tree70dafe680da0323f1768c9ec8f9846fe11c358a6 /plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse
parentddc47ae9bada830e072522e4cc6251e8008f00a3 (diff)
downloadorg.eclipse.tcf-0dca60bde34a25fef299272ffbcbed69eb8d56c7.tar.gz
org.eclipse.tcf-0dca60bde34a25fef299272ffbcbed69eb8d56c7.tar.xz
org.eclipse.tcf-0dca60bde34a25fef299272ffbcbed69eb8d56c7.zip
TCF Debugger: fixed Memory Map backward compatibility with TCF agents ver. 0.4 and older.
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse')
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapWidget.java35
1 files changed, 26 insertions, 9 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapWidget.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapWidget.java
index 932697877..0f7c7394b 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapWidget.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/MemoryMapWidget.java
@@ -484,9 +484,19 @@ public class MemoryMapWidget {
String id = null;
TCFNodeExecContext node = mem_cache.getData();
if (node != null) {
- TCFDataCache<String> name_cache = node.getFullName();
- if (!name_cache.validate(this)) return;
- id = name_cache.getData();
+ TCFDataCache<IMemory.MemoryContext> mem_ctx = node.getMemoryContext();
+ if (!mem_ctx.validate(this)) return;
+ if (mem_ctx.getData() != null) {
+ if (node.getModel().getLaunch().isMemoryMapPreloadingSupported()) {
+ TCFDataCache<String> name_cache = node.getFullName();
+ if (!name_cache.validate(this)) return;
+ id = name_cache.getData();
+ }
+ else {
+ id = mem_ctx.getData().getName();
+ }
+ if (id == null) id = node.getID();
+ }
}
done(id);
}
@@ -517,12 +527,19 @@ public class MemoryMapWidget {
if (n instanceof TCFNodeExecContext) {
TCFNodeExecContext exe = (TCFNodeExecContext)n;
if (!collectMemoryNodes(exe.getChildren())) return false;
- TCFDataCache<IMemory.MemoryContext> mem = exe.getMemoryContext();
- if (!mem.validate(this)) return false;
- if (mem.getData() != null) {
- TCFDataCache<String> nm = exe.getFullName();
- if (!nm.validate(this)) return false;
- String s = nm.getData();
+ TCFDataCache<IMemory.MemoryContext> mem_ctx = exe.getMemoryContext();
+ if (!mem_ctx.validate(this)) return false;
+ if (mem_ctx.getData() != null) {
+ String s = null;
+ if (exe.getModel().getLaunch().isMemoryMapPreloadingSupported()) {
+ TCFDataCache<String> nm = exe.getFullName();
+ if (!nm.validate(this)) return false;
+ s = nm.getData();
+ }
+ else {
+ s = mem_ctx.getData().getName();
+ }
+ if (s == null) s = exe.getID();
if (s != null) target_map_nodes.put(s, exe);
}
}

Back to the top