exp/2532: -var-create command fails for typedef array defined inside a structure
harishd@tensilica.com
harishd@tensilica.com
Wed Oct 1 11:58:00 GMT 2008
>Number: 2532
>Category: exp
>Synopsis: -var-create command fails for typedef array defined inside a structure
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Oct 01 11:58:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: harishd@tensilica.com
>Release: unknown-1.0
>Organization:
>Environment:
win
>Description:
#include <stdio.h>
typedef long k[5];
typedef struct students {
int a_rollNumber;
k array_variable;
// long my_var[17];
} Students;
int main () {
Students student;
student.a_rollNumber = 3;
return 0;
}
Here while debugging if I use the gdb mi command
-var-create - * *(((student).array_variable)+0)@5
It gives me error saying
(gdb)
-var-create - * *(((student).array_variable)+0)@5
&"Argument to arithmetic operation not a number or boolean.\n"
&"Argument to arithmetic operation not a number or boolean.\n"
^error,msg="Argument to arithmetic operation not a number or boolean."
(gdb)
Is this the right way to create the expression in Â-var-create command?
The above problem comes only while using typedef array else the Â-var-create command works properly
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gdb-prs
mailing list