From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>, Simon Marchi <simon.marchi@polymtl.ca>
Subject: [committed][gdb/symtab] Save modules in .debug_names
Date: Mon, 11 May 2020 17:14:42 +0200 [thread overview]
Message-ID: <20200511151441.GA19472@delia> (raw)
Hi,
When running test-case gdb.fortran/info-modules.exp with target board
debug-names, I run into:
...
FAIL: gdb.fortran/info-modules.exp: info modules: check for entry \
'info-types-2.f90', '18', 'mod2'
...
In more detail, comparing the behaviour of the executable without and with
.debug_names section, we have:
...
-$ gdb -batch info-modules -ex "info modules"
+$ gdb -batch info-modules.debugnames -ex "info modules"
All defined modules:
-File /data/gdb_versions/devel/src/gdb/testsuite/gdb.fortran/info-types-2.f90:
-18: mod2
-
File /data/gdb_versions/devel/src/gdb/testsuite/gdb.fortran/info-types.f90:
16: mod1
...
This is due to the fact that the .debug_names section does not contain
DW_TAG_module entries.
Fix this in debug_names::psymbol_tag.
Build and tested on x86_64-linux with target board debug-names.
Committed to trunk.
Thanks,
- Tom
[gdb/symtab] Save modules in .debug_names
gdb/ChangeLog:
2020-05-11 Tom de Vries <tdevries@suse.de>
* dwarf2/index-write.c (debug_names::psymbol_tag): Handle
MODULE_DOMAIN.
---
gdb/dwarf2/index-write.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c
index fc42816b1e..eabfe5d682 100644
--- a/gdb/dwarf2/index-write.c
+++ b/gdb/dwarf2/index-write.c
@@ -1209,6 +1209,8 @@ class debug_names
}
case STRUCT_DOMAIN:
return DW_TAG_structure_type;
+ case MODULE_DOMAIN:
+ return DW_TAG_module;
default:
return 0;
}
reply other threads:[~2020-05-11 15:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200511151441.GA19472@delia \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).