public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/30265] New: [gdb/symtab] info var shows incorrect file/line combination for static const class member
@ 2023-03-23  9:24 vries at gcc dot gnu.org
  2023-03-23 10:31 ` [Bug symtab/30265] " vries at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: vries at gcc dot gnu.org @ 2023-03-23  9:24 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30265

            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, but 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 
     1  // 2002-08-16
     2
     3  #include "m-static.h"
     4
     5  const int gnu_obj_4::elsewhere = 221;
$
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-03-24 14:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23  9:24 [Bug symtab/30265] New: [gdb/symtab] info var shows incorrect file/line combination for static const class member vries at gcc dot gnu.org
2023-03-23 10:31 ` [Bug symtab/30265] " vries at gcc dot gnu.org
2023-03-23 10:44 ` vries at gcc dot gnu.org
2023-03-23 10:54 ` vries at gcc dot gnu.org
2023-03-23 12:04 ` vries at gcc dot gnu.org
2023-03-24  8:18 ` cvs-commit at gcc dot gnu.org
2023-03-24  8:41 ` vries at gcc dot gnu.org
2023-03-24 14:46 ` cvs-commit at gcc dot gnu.org
2023-03-24 14:46 ` vries at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).