From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7685F385783F; Thu, 23 Mar 2023 09:24:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7685F385783F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679563468; bh=IrIYquzXG9Dqh1aGqmaqJMWRAfgkpeiKlxa2JhWVvPY=; h=From:To:Subject:Date:From; b=AstIgQm6WPYobt9s0atWOvZXIho3jKns+LpcK5C9h0Sz18GQDUmYu2wmBA54jhc1D hj/fLUtncAyem2RvrcEmUEfvpEFCMZw7MmxvRA8z5AIA78MV6f+A7ooHTalMjr12u0 oVJsiZg4QaU+XwuNmYswjGDSw7zRywl2XMms39Dw= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/30265] New: [gdb/symtab] info var shows incorrect file/line combination for static const class member Date: Thu, 23 Mar 2023 09:24:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30265 Bug ID: 30265 Summary: [gdb/symtab] info var shows incorrect file/line combination for static const class member Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: symtab Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- With gdb-10-branch/gdb-11-branch, we have for m-static.exp: ... (gdb) info variable everywhere^M All variables matching regular expression "everywhere":^M ^M File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static.h:^M 8: const int gnu_obj_4::everywhere;^M (gdb) PASS: gdb.cp/m-static.exp: info variable everywhere ... Likewise with readnow. With gdb-12-branch, we have: ... (gdb) info variable everywhere^M All variables matching regular expression "everywhere":^M ^M File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static.h:^M 8: const int gnu_obj_4::everywhere;^M ^M File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static1.cc:^M 8: const int gnu_obj_4::everywhere;^M (gdb) PASS: gdb.cp/m-static.exp: info variable everywhere ... and likewise with readnow (on ubuntu this doesn't reproduce with native, bu= t it does with readnow). The file/line combination looks wrong: line 8 and file m-static1.cc: ... $ cat -n gdb/testsuite/gdb.cp/m-static1.cc=20 1 // 2002-08-16 2 3 #include "m-static.h" 4 5 const int gnu_obj_4::elsewhere =3D 221; $ ... --=20 You are receiving this mail because: You are on the CC list for the bug.=