Skip to main content
summaryrefslogtreecommitdiffstats
path: root/memory
diff options
context:
space:
mode:
authorJohn Cortell2010-05-20 11:02:31 -0400
committerJohn Cortell2010-05-20 11:02:31 -0400
commit4578a2a5ca0d5a5cef5af50d77fa30466111dd38 (patch)
treec5adb58a36bb5abe78faa58f621191f95466d80f /memory
parent4a6ea58842514aad79004dab076676e020dabc3b (diff)
downloadorg.eclipse.cdt-4578a2a5ca0d5a5cef5af50d77fa30466111dd38.tar.gz
org.eclipse.cdt-4578a2a5ca0d5a5cef5af50d77fa30466111dd38.tar.xz
org.eclipse.cdt-4578a2a5ca0d5a5cef5af50d77fa30466111dd38.zip
Bug 309032: Need APIs to support memory pages (add ability for backend to indicate a memory space qualification is necessary)
Diffstat (limited to 'memory')
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java21
1 files changed, 17 insertions, 4 deletions
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java
index 7a6adf78d4..853890c395 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java
+++ b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java
@@ -367,11 +367,15 @@ public class MemoryBrowser extends ViewPart implements IDebugContextListener, IM
}
private void performGo(boolean inNewTab) {
- // Index zero is the 'auto' (n/a) memory space entry
+ // Index zero is the 'auto' (n/a) memory space entry, unless the backend
+ // said we need to force a memory space selection
String memorySpace = null;
- if (fGotoMemorySpaceControl.isVisible() && (fGotoMemorySpaceControl.getSelectionIndex() != 0)) {
+ if (fGotoMemorySpaceControl.isVisible()) {
memorySpace = fGotoMemorySpaceControl.getText();
- assert (memorySpace != null) && (memorySpace.length() > 0);
+ if (memorySpace.equals(NA_MEMORY_SPACE_ID)) {
+ memorySpace = null;
+ }
+ assert (memorySpace == null) || (memorySpace.length() > 0);
}
String expression = fGotoAddressBar.getExpressionText();
@@ -855,7 +859,16 @@ public class MemoryBrowser extends ViewPart implements IDebugContextListener, IM
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=309032#c50
if (memorySpaces.length >= 2) {
fGotoMemorySpaceControl.setItems(memorySpaces);
- fGotoMemorySpaceControl.add(NA_MEMORY_SPACE_ID, 0); //$NON-NLS-1$ the n/a entry; don't think this needs to be translated
+
+ // Add the '----' (N/A) entry unless the retrieval object
+ // says it requires a memory space ID in all cases
+ boolean addNA = true;
+ if (retrieval instanceof IMemorySpaceAwareMemoryBlockRetrieval) {
+ addNA = !((IMemorySpaceAwareMemoryBlockRetrieval)retrieval).creatingBlockRequiresMemorySpaceID();
+ }
+ if (addNA) {
+ fGotoMemorySpaceControl.add(NA_MEMORY_SPACE_ID, 0);
+ }
setMemorySpaceControlVisible(true);
}
else {

Back to the top