public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30180] New: FAIL: gdb.fortran/module.exp: print var_d
@ 2023-02-28 13:05 vries at gcc dot gnu.org
0 siblings, 0 replies; only message in thread
From: vries at gcc dot gnu.org @ 2023-02-28 13:05 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30180
Bug ID: 30180
Summary: FAIL: gdb.fortran/module.exp: print var_d
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: fortran
Assignee: unassigned at sourceware dot org
Reporter: vries at gcc dot gnu.org
Target Milestone: ---
On powerpc64le-linux (centos 7, with gcc 4.8.5), I run into:
...
(gdb) PASS: gdb.fortran/module.exp: print var_c
print var_d^M
Missing ELF symbol "var_d".^M
(gdb) FAIL: gdb.fortran/module.exp: print var_d
...
Looking at the debuginfo, we have an imported_declaration:
...
<2><19b>: Abbrev Number: 12 (DW_TAG_imported_declaration)
<19c> DW_AT_decl_file : 1
<19d> DW_AT_decl_line : 59
<19e> DW_AT_name : var_d
<1a2> DW_AT_import : <0x20b> [Abbrev Number: 14 (DW_TAG_variable)]
...
referring to a declaration:
...
<2><20b>: Abbrev Number: 14 (DW_TAG_variable)
<20c> DW_AT_name : var_c
<210> DW_AT_decl_file : 1
<211> DW_AT_decl_line : 33
<212> DW_AT_linkage_name: __modmany_MOD_var_c
<216> DW_AT_type : <0x60>
<21a> DW_AT_external : 1
<21a> DW_AT_declaration : 1
...
In contrast, on x86_64-linux (openSUSE Leap 15.4, with gcc 7.5.0), I have:
...
(gdb) PASS: gdb.fortran/module.exp: print var_c
print var_d^M
$8 = 12^M
(gdb) PASS: gdb.fortran/module.exp: print var_d
...
with debuginfo also mentioning an imported_declaration:
...
<2><2df>: Abbrev Number: 12 (DW_TAG_imported_declaration)
<2e0> DW_AT_decl_file : 1
<2e1> DW_AT_decl_line : 59
<2e2> DW_AT_name : var_d
<2e6> DW_AT_import : <0x1b7> [Abbrev Number: 3 (DW_TAG_variable)]
...
but referring to a definition, with location attribute:
...
<2><1b7>: Abbrev Number: 3 (DW_TAG_variable)
<1b8> DW_AT_name : var_c
<1bc> DW_AT_decl_file : 1
<1bd> DW_AT_decl_line : 33
<1be> DW_AT_linkage_name: __modmany_MOD_var_c
<1c2> DW_AT_type : <0xf2>
<1c6> DW_AT_external : 1
<1c6> DW_AT_location : 9 byte block: 3 44 20 40 0 0 0 0 0
(DW_OP_addr: 402044)
...
So, I'd classify this as a testsuite issue and xfail it for some compiler
versions, but I wonder. We have this trick in gdb where we combine a decl with
a minimal symbol in order to get the location, so why doesn't this work? Is
this not enabled for fortran?
The minimal symbol seems to be there:
...
$ nm outputs/gdb.fortran/module/module | grep __modmany_MOD_var_c
0000000010020058 D __modmany_MOD_var_c
...
so it could work.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-28 13:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-28 13:05 [Bug fortran/30180] New: FAIL: gdb.fortran/module.exp: print var_d 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).