This is the mail archive of the gdb-prs@sourceware.org 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]

[Bug gdb/14696] New: 'info var" incorrect


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.


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