Community
Participate
Working Groups
Build Identifier: Eclipse SDK Version: 3.6.0 Build id: I20100312-1448, CDT 7.0, CVS version 20100504 from HEAD When I cast a pointer to an array in the Variables View twice the start indices of the two casts are added. Reproducible: Always Steps to Reproduce: Consider the following code snippet: float * f = new float[10]; for (int i = 0; i < 10; ++i) f[i] = i; In the Variables View cast f to an array with start index 3 and length 3. You will see f[3],f[4],f[5] with the correct values 3.0,4.0 and 5.0 The select f again and cast it to an array with start index 2 and length 3. Expected: f[2],f[3],f[4] with the correct values 2,0,3.0 and 4.0 But you will see: f[5],f[6],f[7] with the values 5,0,6.0 and 7.0
Casts are always accumulated (which I don't think a good idea anyway). You have to clean the casts first to cast to something new.
As Alena rightly mentioned (even though she didn't like it) it is the expected behavior. You cast to type the current not the original type.
(In reply to comment #2) > As Alena rightly mentioned (even though she didn't like it) it is the expected > behavior. You cast to type the current not the original type. This behavior is then different for EDC and the DSF-GDB implementation I am working currently on (see bug #06555). Cast to type and cast to array can be combined but cast to array is always a recast (new length and start index).
(In reply to comment #3) > working currently on (see bug #06555). Cast to type and cast to array can be That should be bug #306555