]> git.ipfire.org Git - thirdparty/gcc.git/commit
dwarf: Generate DIEs for external variables with -g1 [93751]
authorAlexey Neyman <stilor@att.net>
Sun, 15 Mar 2020 00:05:36 +0000 (17:05 -0700)
committerJason Merrill <jason@redhat.com>
Wed, 18 Mar 2020 01:22:09 +0000 (21:22 -0400)
commit52b3aa8be18938486065f5f2a23553b134a10a81
tree89df55ea35d3950dc8448d4e8edf2e31814854ca
parent80616e5b7a5caf6f41210c9451a32de2fd64528e
dwarf: Generate DIEs for external variables with -g1 [93751]

-g1 is described in the manual to generate debug info for functions and
external variables. It does that for older debugging formats but not for
DWARF. This change brings DWARF in line with the rest of the debugging
formats and with the manual.

gcc/ChangeLog
2020-03-17  Alexey Neyman  <stilor@att.net>

PR debug/93751
* dwarf2out.c (gen_decl_die): Proceed to generating the DIE if
the debug level is terse and the declaration is public. Do not
generate type info.
(dwarf2out_decl): Same.
(add_type_attribute): Return immediately if debug level is
terse.

Signed-off-by: Alexey Neyman <stilor@att.net>
gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/gcc.dg/debug/dwarf2/pr93751-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/debug/dwarf2/pr93751-2.c [new file with mode: 0644]