Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] -var-create on typedef'ed array inside a structure fails

Hi all,

While using the below code


typedef long k[5];

typedef struct students {
    int a_rollNumber;   
    k array_variable;
} Students;

int main () {
      Students student;
      student.a_rollNumber = 3;
    return 0;
}

When I run the above code snippet in Debug mode (using gdb) and try to
click and expand the value of the ¬ďarray_variable" variable,
the variable view crashes with an error message displayed in the view as
¬ďArgument to arithmetic operation not a number or boolean"

I get this console message in gdb console:

[1,222,865,794,703] 577-var-create - * *(((student).array_variable)+0)@5

[1,222,865,794,703] &"Argument to arithmetic operation not a number or boolean.\n"

[1,222,865,794,703] 577^error,msg="Argument to arithmetic operation not a number or boolean."

[1,222,865,794,703] (gdb)

While searching from the mailing list I found a thread related to this
http://dev.eclipse.org/newslists/news.eclipse.tools.cdt/msg09048.html

And a bug is filed for this kind of bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=118114

the only difference in the above filed bug and mine is that I am using typedef array inside structure

Can anyone else also reproduce this problem?
I am using eclipse 3.4 and cdt 5

Thanks in advance
Harish.
Tensilica Technologies India
Pune




Rediff Shopping

Back to the top