Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Ryall2007-05-11 02:21:57 +0000
committerKen Ryall2007-05-11 02:21:57 +0000
commit04f8a1f32fdc55a2638aa1dd63d4f2710038cde8 (patch)
tree31b403147d89c4dde7aac432c7d207ce052229a7 /debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug
parent548f63a12a511ebe0c557a6cf0d75813264d658a (diff)
downloadorg.eclipse.cdt-04f8a1f32fdc55a2638aa1dd63d4f2710038cde8.tar.gz
org.eclipse.cdt-04f8a1f32fdc55a2638aa1dd63d4f2710038cde8.tar.xz
org.eclipse.cdt-04f8a1f32fdc55a2638aa1dd63d4f2710038cde8.zip
Bug 185956, now returns CDI interface.
Diffstat (limited to 'debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug')
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java12
1 files changed, 9 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 17c85b9825b..571e04b240b 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
@@ -56,6 +56,7 @@ import org.eclipse.cdt.debug.core.cdi.event.ICDIResumedEvent;
import org.eclipse.cdt.debug.core.cdi.event.ICDISuspendedEvent;
import org.eclipse.cdt.debug.core.cdi.model.ICDIAddressFactoryManagement;
import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
+import org.eclipse.cdt.debug.core.cdi.model.ICDIGlobalVariableDescriptor;
import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
import org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary;
import org.eclipse.cdt.debug.core.cdi.model.ICDISignal;
@@ -1362,18 +1363,23 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
ICDITarget cdiTarget = getCDITarget();
IGlobalVariableDescriptor[] globals = new IGlobalVariableDescriptor[0];
// If the backend can give us the globals...
+ ArrayList list = new ArrayList();
if (cdiTarget instanceof ICDITarget2)
- globals = ((ICDITarget2) cdiTarget).getGlobalVariables();
+ {
+ ICDIGlobalVariableDescriptor[] cdiGlobals = ((ICDITarget2) cdiTarget).getGlobalVariables();
+ for (int i = 0; i < cdiGlobals.length; i++) {
+ list.add(CVariableFactory.createGlobalVariableDescriptor(cdiGlobals[i].getName(), null));
+ }
+ }
// otherwise ask the binary
if (globals.length == 0)
{
- ArrayList list = new ArrayList();
IBinaryObject file = getBinaryFile();
if (file != null) {
list.addAll( getCFileGlobals( file ) );
}
- globals = (IGlobalVariableDescriptor[])list.toArray( new IGlobalVariableDescriptor[list.size()] );
}
+ globals = (IGlobalVariableDescriptor[])list.toArray( new IGlobalVariableDescriptor[list.size()] );
return globals;
}

Back to the top