Bug 71992 - type array are reversed
Summary: type array are reversed
Status: VERIFIED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 2.0   Edit
Hardware: PC All
: P3 critical (vote)
Target Milestone: 2.0.1   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-14 21:54 EDT by Alain Magloire CLA
Modified: 2004-08-31 09:02 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alain Magloire CLA 2004-08-14 21:54:46 EDT
For fixing PR 70688.  Now the type for
int array[2][3]

  is define like:
- ArrayType(2) --> int[2][3]
  - ArrayType (3) --> int[3]
     - IntegerType (int) --> int

It seems that it was reverse before.  I've commited in the head
a fix for this:
 GDBTypeParser.java (mi plugin)
 CType.java  (cdt.debug.core plugin)

But the fixes should be move to 2_0_CDT branch and 1_2_1 branch
Comment 1 Alain Magloire CLA 2004-08-16 15:03:19 EDT
Fix in 1_2_1, 2_0 and head
Comment 2 Tanya Wolff CLA 2004-08-27 14:34:13 EDT
I'd like to verify this, but not sure how... I've defined the int array[2][3]
values and they show up correctly in the variables view.
Is that all I need to do or was there a cast to type problem?
Comment 3 Alain Magloire CLA 2004-08-27 15:22:22 EDT
> I'd like to verify this, but not sure how... 
> I've defined the int array[2][3]
> values and they show up correctly in the variables view.
> Is that all I need to do or was there a cast to type problem?

Yes, in the variable view, show the type.  If in your code
you have

int array[2][3];

It used to show as the type for array
   int [3][2]

Obviously this is wrong, the element indexes were reversed.

It should say now
  int [2] [3]

Thanks.

Comment 4 Tanya Wolff CLA 2004-08-27 16:56:58 EDT
Alrighty then, I clicked the "show type names" button in the variables view and
all is well.
You get to mark this defect verified Alain, since I'm not the reporter.
Thanks.
Comment 5 Tanya Wolff CLA 2004-08-27 17:00:32 EDT
I verified in CDT 2.0.1 build 200408271356 and CDT 2.1.0 build 200408270300.
Comment 6 Alain Magloire CLA 2004-08-31 09:02:12 EDT
> You get to mark this defect verified Alain, since I'm not the reporter.
> Thanks.

Merci bucket for checking this.