Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java')
-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