From 0dca60bde34a25fef299272ffbcbed69eb8d56c7 Mon Sep 17 00:00:00 2001 From: eutarass Date: Thu, 23 Jun 2011 17:27:48 +0000 Subject: TCF Debugger: fixed Memory Map backward compatibility with TCF agents ver. 0.4 and older. --- .../tcf/debug/ui/commands/MemoryMapWidget.java | 35 ++++++++++++++++------ 1 file changed, 26 insertions(+), 9 deletions(-) (limited to 'plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse') 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 name_cache = node.getFullName(); - if (!name_cache.validate(this)) return; - id = name_cache.getData(); + TCFDataCache mem_ctx = node.getMemoryContext(); + if (!mem_ctx.validate(this)) return; + if (mem_ctx.getData() != null) { + if (node.getModel().getLaunch().isMemoryMapPreloadingSupported()) { + TCFDataCache 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 mem = exe.getMemoryContext(); - if (!mem.validate(this)) return false; - if (mem.getData() != null) { - TCFDataCache nm = exe.getFullName(); - if (!nm.validate(this)) return false; - String s = nm.getData(); + TCFDataCache 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 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); } } -- cgit v1.2.3