From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9295 invoked by alias); 1 Oct 2008 11:58:02 -0000 Received: (qmail 9278 invoked by uid 71); 1 Oct 2008 11:58:01 -0000 Resent-Date: 1 Oct 2008 11:58:01 -0000 Resent-Message-ID: <20081001115801.9277.qmail@sourceware.org> Resent-From: gdb-gnats@sources.redhat.com (GNATS Filer) Resent-To: nobody@sources.redhat.com Resent-Cc: gdb-prs@sources.redhat.com Resent-Reply-To: gdb-gnats@sources.redhat.com, harishd@tensilica.com Received: (qmail 8964 invoked by uid 48); 1 Oct 2008 11:56:21 -0000 Message-Id: <20081001115621.8963.qmail@sourceware.org> Date: Wed, 01 Oct 2008 11:58:00 -0000 From: harishd@tensilica.com Reply-To: harishd@tensilica.com To: gdb-gnats@sources.redhat.com X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: exp/2532: -var-create command fails for typedef array defined inside a structure Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2008-q4/txt/msg00001.txt.bz2 >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 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: