This is the mail archive of the gdb-prs@sources.redhat.com 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/1796: Variable length array displayed incorrectly


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


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