Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Khodjaiants2002-10-07 14:02:48 -0400
committerMikhail Khodjaiants2002-10-07 14:02:48 -0400
commit0180598ed2ab21f1c4a29df450d99926f4ffd667 (patch)
tree530e9f37d309d59b24630fcde808249e32a62460
parent8f4ba58fe7cea1a3aa05aab818f18cecb95198e6 (diff)
downloadorg.eclipse.cdt-0180598ed2ab21f1c4a29df450d99926f4ffd667.tar.gz
org.eclipse.cdt-0180598ed2ab21f1c4a29df450d99926f4ffd667.tar.xz
org.eclipse.cdt-0180598ed2ab21f1c4a29df450d99926f4ffd667.zip
Use the number of actual children as a length of array instead of the number returned by gdb.
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java
index 51e7d164a4d..1edc56dacba 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java
@@ -129,9 +129,8 @@ public class CValue extends CDebugElement implements ICValue
List vars = getCDIVariables();
if ( getType() == ICValue.TYPE_ARRAY )
{
- int length = getNumberOfChildren();
- if ( length > 0 )
- fVariables = CArrayPartition.splitArray( (CDebugTarget)getDebugTarget(), vars, 0, length - 1 );
+ if ( vars.size() > 0 )
+ fVariables = CArrayPartition.splitArray( (CDebugTarget)getDebugTarget(), vars, 0, vars.size() - 1 );
}
else
{

Back to the top