mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-05 00:36:16 +02:00
Fix for bug 50981: In the 'getValue' method of CVariable 'getType' should be only called once.
This commit is contained in:
parent
2e8a72022a
commit
9d0e717ea4
2 changed files with 15 additions and 2 deletions
|
@ -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
|
2004-01-15 Mikhail Khodjaiants
|
||||||
Fix for bug 48682: IThread.getBreakpoints() stubbed out.
|
Fix for bug 48682: IThread.getBreakpoints() stubbed out.
|
||||||
* CDebugTarget.java
|
* CDebugTarget.java
|
||||||
|
|
|
@ -435,7 +435,16 @@ public abstract class CVariable extends CDebugElement
|
||||||
return fDisabledValue;
|
return fDisabledValue;
|
||||||
if ( fValue == null )
|
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;
|
ICDIVariable var = null;
|
||||||
try
|
try
|
||||||
|
@ -446,7 +455,7 @@ public abstract class CVariable extends CDebugElement
|
||||||
{
|
{
|
||||||
requestFailed( "", e );
|
requestFailed( "", e );
|
||||||
}
|
}
|
||||||
int[] dims = getType().getArrayDimensions();
|
int[] dims = type.getArrayDimensions();
|
||||||
if ( dims.length > 0 && dims[0] > 0 )
|
if ( dims.length > 0 && dims[0] > 0 )
|
||||||
fValue = CValueFactory.createArrayValue( this, var, 0, dims[0] - 1 );
|
fValue = CValueFactory.createArrayValue( this, var, 0, dims[0] - 1 );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue