public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/symtab] Save modules in .debug_names
@ 2020-05-11 15:13 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2020-05-11 15:13 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7666722fce2a26a32d9d931e9ce0fea8a7209185
commit 7666722fce2a26a32d9d931e9ce0fea8a7209185
Author: Tom de Vries <tdevries@suse.de>
Date: Mon May 11 17:13:49 2020 +0200
[gdb/symtab] Save modules in .debug_names
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.
gdb/ChangeLog:
2020-05-11 Tom de Vries <tdevries@suse.de>
* dwarf2/index-write.c (debug_names::psymbol_tag): Handle
MODULE_DOMAIN.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/dwarf2/index-write.c | 2 ++
2 files changed, 7 insertions(+)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3b04b6c8d91..a0921f4667f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2020-05-11 Tom de Vries <tdevries@suse.de>
+
+ * dwarf2/index-write.c (debug_names::psymbol_tag): Handle
+ MODULE_DOMAIN.
+
2020-05-11 Tom de Vries <tdevries@suse.de>
PR symtab/25941
diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c
index fc42816b1e7..eabfe5d682b 100644
--- a/gdb/dwarf2/index-write.c
+++ b/gdb/dwarf2/index-write.c
@@ -1209,6 +1209,8 @@ private:
}
case STRUCT_DOMAIN:
return DW_TAG_structure_type;
+ case MODULE_DOMAIN:
+ return DW_TAG_module;
default:
return 0;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-05-11 15:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 15:13 [binutils-gdb] [gdb/symtab] Save modules in .debug_names Tom de Vries
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).