Summary: | `info variables` for `int * const x[]` gives `int * constx[1]` (no space between `const` and name) | ||
---|---|---|---|
Product: | gdb | Reporter: | Vlad <swbz> |
Component: | gdb | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | aburgess, eager, ssbssa |
Priority: | P2 | ||
Version: | HEAD | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Attachments: | Possible fix. |
Description
Vlad
2021-07-22 13:19:58 UTC
Created attachment 13569 [details]
Possible fix.
Still in testing here, but if it passes I'll post this to the m/l.
The master branch has been updated by Andrew Burgess <aburgess@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=77791f9c21ec05423db6724a3be543f2cb6e5822 commit 77791f9c21ec05423db6724a3be543f2cb6e5822 Author: Andrew Burgess <andrew.burgess@embecosm.com> Date: Mon Jul 26 17:29:05 2021 +0100 gdb: fix missing space in some info variables output Fixes PR gdb/28121. When a user declares an array like this: int * const foo_1[3]; And in GDB the user does this: (gdb) info variables foo All variables matching regular expression "foo": File test.c: 1: int * constfoo_1[3]; Notice the missing space between 'const' and 'foo_1'. This is fixed in c_type_print_varspec_prefix (c-typeprint.c) by passing through the flag that indicates if a trailing space is needed, rather than hard coding the flag to false as we currently do. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28121 I believe this issue should now be fixed. |