This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug c++/15770] New: "Info Variables" returns bad results for typedef array
- From: "b_smith at aerosimulation dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 22 Jul 2013 20:26:57 +0000
- Subject: [Bug c++/15770] New: "Info Variables" returns bad results for typedef array
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=15770
Bug ID: 15770
Summary: "Info Variables" returns bad results for typedef array
Product: gdb
Version: 7.2
Status: NEW
Severity: normal
Priority: P2
Component: c++
Assignee: unassigned at sourceware dot org
Reporter: b_smith at aerosimulation dot com
When using "info variables" on a structure with a custom float type, the array
length value indicates 0 when it should be 8.
Sample code to reproduce is below:
test.c
--------------------------------
typedef float float32;
const float32 hsi_range[] = {2.5, 5.0, 10.0, 20.0, 40.0, 80.0, 160.0, 320.0};
typedef struct {
float32 f32ara[8];
int a;
char c;
} shm_rec_t;
shm_rec_t shm;
int main()
{
return 0;
}
-------------------------------
At the command line:
$ g++ -g test.c -o T
$ gdb T
(gdb) info variables
...
...
(gdb) ptype shm_rec_t
- When called, this will return "float32 f32ara[0];" for the first element in
the struct.
--
You are receiving this mail because:
You are on the CC list for the bug.