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];
Dup. *** This bug has been marked as a duplicate of bug 28121 ***