This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/14696] New: 'info var" incorrect
- From: "eager at eagercon dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 10 Oct 2012 17:57:08 +0000
- Subject: [Bug gdb/14696] New: 'info var" incorrect
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=14696
Bug #: 14696
Summary: 'info var" incorrect
Product: gdb
Version: HEAD
Status: NEW
Severity: minor
Priority: P2
Component: gdb
AssignedTo: unassigned@sourceware.org
ReportedBy: eager@eagercon.com
Classification: Unclassified
The "info var" command displays a symbol incorrectly when it is a const array
of pointers.
test.c:
int a, b;
int * const c[5] = {&a, &a, &a, &a, &a};
int const d[5] = {1, 2, 3, 4, 5};
int main(void) {
*c[0] = 4;
// c[1] = &b; /* Illegal assignment. */
return 0;
}
$ gcc -g -o test test.c
$gdb test
. . .
(gdb) info var c
All variables matching regular expression "c":
File test.c:
int * constc[5];
(gdb) info var d
All variables matching regular expression "d":
File test.c:
const int d[5];
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.