Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorKen Ryall2007-06-07 03:24:01 +0000
committerKen Ryall2007-06-07 03:24:01 +0000
commitde268f3094154a79e06e347a79bd39c6c7255592 (patch)
tree9ca21374b6fc0f57f7d34ecabbaff593f47b7972 /debug
parentfbb25215d4ae83ce2acfb77c99d4738d193a43d4 (diff)
downloadorg.eclipse.cdt-de268f3094154a79e06e347a79bd39c6c7255592.tar.gz
org.eclipse.cdt-de268f3094154a79e06e347a79bd39c6c7255592.tar.xz
org.eclipse.cdt-de268f3094154a79e06e347a79bd39c6c7255592.zip
Allow the backend to return null list of globals.
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java
index f80194f5bd5..81ad1d14d6a 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java
@@ -1363,16 +1363,21 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
ICDITarget cdiTarget = getCDITarget();
IGlobalVariableDescriptor[] globals = new IGlobalVariableDescriptor[0];
// If the backend can give us the globals...
+ boolean hasCDIGlobals = false;
ArrayList list = new ArrayList();
if (cdiTarget instanceof ICDITarget2)
{
ICDIGlobalVariableDescriptor[] cdiGlobals = ((ICDITarget2) cdiTarget).getGlobalVariables();
- for (int i = 0; i < cdiGlobals.length; i++) {
- list.add(CVariableFactory.createGlobalVariableDescriptor(cdiGlobals[i].getName(), null));
+ hasCDIGlobals = cdiGlobals != null;
+ if (hasCDIGlobals)
+ {
+ for (int i = 0; i < cdiGlobals.length; i++) {
+ list.add(CVariableFactory.createGlobalVariableDescriptor(cdiGlobals[i].getName(), null));
+ }
}
}
// otherwise ask the binary
- if (list.size() == 0)
+ if (!hasCDIGlobals)
{
IBinaryObject file = getBinaryFile();
if (file != null) {

Back to the top