This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

exp/2532: -var-create command fails for typedef array defined inside a structure


>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]