binutils-gdb/gdb/dwarf2
Tom de Vries 9ed6d7410c [gdb/symtab] Fix line number of static const class member
Since commit 6d263fe46e ("Avoid bad breakpoints with --gc-sections"), there
was a silent regression on openSUSE Leap 15.4 for test-case
gdb.cp/m-static.exp, from:
...
(gdb) info variable everywhere^M
All variables matching regular expression "everywhere":^M
^M
File /home/vries/tmp.local-remote-host-native/m-static.h:^M
8:      const int gnu_obj_4::everywhere;^M
(gdb)
...
to:
...
(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)
...

Another regression was found due to that commit, and it was fixed in commit
99d679e7b3 ("[gdb/symtab] Fix "file index out of range" complaint") by
limiting the scope of the fix in the original commit.

Fix this regression by yet further limiting the scope of that fix, making sure
that this bit in dwarf_decode_lines is executed again for m-static1.cc:
...
  /* Make sure a symtab is created for every file, even files
     which contain only variables (i.e. no code with associated
     line numbers).  */
...

Tested on x86_64-linux.

PR symtab/30265
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30265
2023-03-24 15:45:56 +01:00
..
abbrev-cache.c
abbrev-cache.h
abbrev.c
abbrev.h
attribute.c
attribute.h
call-site.h
comp-unit-head.c
comp-unit-head.h
cooked-index.c
cooked-index.h
cu.c Rename objfile_type to builtin_type 2023-03-18 11:12:38 -06:00
cu.h
die.c
die.h
dwz.c
dwz.h
expr.c Unify arch_integer_type and init_integer_type 2023-03-18 11:12:37 -06:00
expr.h
file-and-dir.h
frame-tailcall.c
frame-tailcall.h
frame.c
frame.h
index-cache.c
index-cache.h
index-common.c
index-common.h
index-write.c
index-write.h
leb.c
leb.h
line-header.c
line-header.h
loc.c
loc.h
macro.c
macro.h
mapped-index.h
public.h
read-debug-names.c
read-debug-names.h
read-gdb-index.c
read-gdb-index.h
read.c [gdb/symtab] Fix line number of static const class member 2023-03-24 15:45:56 +01:00
read.h
sect-names.h
section.c
section.h
stringify.c
stringify.h
tag.h
types.h