This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
exp/2532: -var-create command fails for typedef array defined inside a structure
- From: harishd at tensilica dot com
- To: gdb-gnats at sources dot redhat dot com
- Date: 1 Oct 2008 11:56:21 -0000
- Subject: exp/2532: -var-create command fails for typedef array defined inside a structure
- Reply-to: harishd at tensilica dot com
>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: