1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fix for bug 50981: In the 'getValue' method of CVariable 'getType' should be only called once.

This commit is contained in:
Mikhail Khodjaiants 2004-01-30 17:44:32 +00:00
parent 2e8a72022a
commit 9d0e717ea4
2 changed files with 15 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2004-01-30 Mikhail Khodjaiants
Fix for bug 50981: In the 'getValue' method of CVariable 'getType' should be only called once.
* CVariable.java
2004-01-15 Mikhail Khodjaiants
Fix for bug 48682: IThread.getBreakpoints() stubbed out.
* CDebugTarget.java

View file

@ -435,7 +435,16 @@ public abstract class CVariable extends CDebugElement
return fDisabledValue;
if ( fValue == null )
{
if ( getType() != null && getType().isArray() )
ICType type = null;
try
{
type = getType();
}
catch( DebugException e )
{
// ignore and use default type
}
if ( type != null && type.isArray() )
{
ICDIVariable var = null;
try
@ -446,7 +455,7 @@ public abstract class CVariable extends CDebugElement
{
requestFailed( "", e );
}
int[] dims = getType().getArrayDimensions();
int[] dims = type.getArrayDimensions();
if ( dims.length > 0 && dims[0] > 0 )
fValue = CValueFactory.createArrayValue( this, var, 0, dims[0] - 1 );
}