From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C01B33857C44; Tue, 22 Sep 2020 10:21:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C01B33857C44 From: "hi-angel at yandex dot ru" To: gdb-prs@sourceware.org Subject: [Bug gdb/26644] New: `info variables` does not show ones defined with macro Date: Tue, 22 Sep 2020 10:21:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hi-angel at yandex dot ru X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2020 10:21:54 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26644 Bug ID: 26644 Summary: `info variables` does not show ones defined with macro Product: gdb Version: 9.2 Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: hi-angel at yandex dot ru Target Milestone: --- Currently `info variables` command does not print ones declared with `#defi= ne`. I mean, it kinda makes sense if you take the meaning of "variable" as of a mutable identifier. However this is not the meaning gdb uses because the command prints enum fields just fine, which are not mutable either. So this= is a bug. # Steps to reproduce (in terms of terminal commands) $ cat test2.c #define MY_MACRO 7 int main() {} $ gcc test2.c -o a -g3 -O0 $ gdb ./a Reading symbols from ./a... gdb =CE=BB br main Breakpoint 1 at 0x1122: file test2.c, line 3. gdb =CE=BB r Starting program: /tmp/a Breakpoint 1, main () at test2.c:3 3 int main() {} gdb =CE=BB p MY_MACRO $1 =3D 7 gdb =CE=BB info variables MY_MACRO All variables matching regular expression "MY_MACRO": gdb =CE=BB ## Expected `info variables` would print `#define MY_MACRO 7` ## Actual `info variables` did not print anything about MY_MACRO. --=20 You are receiving this mail because: You are on the CC list for the bug.=