This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
exp/1796: Variable length array displayed incorrectly
- From: bernhard dot walle at gmx dot de
- To: gdb-gnats at sources dot redhat dot com
- Date: 23 Oct 2004 08:55:54 -0000
- Subject: exp/1796: Variable length array displayed incorrectly
- Reply-to: bernhard dot walle at gmx dot de
>Number: 1796
>Category: exp
>Synopsis: Variable length array displayed incorrectly
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Oct 23 08:58:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: bernhard.walle@gmx.de
>Release: unknown-1.0
>Organization:
>Environment:
Linux 2.4.21, SuSE 9.0, gdb 6.2.1
>Description:
If I want to display a varialbe length array like in following function, gdb displays only 2 elements and not the right size.
void test(int x)
{
int test[x];
// do something with the array
}
(gdb) print x
$1 = 3
(gdb) print test
$2 = {0, 2}
(gdb) x/3d test
0xbffff000: 0 2 4
>How-To-Repeat:
See above.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: