diff options
author | Bernhard Heckel <bernhard.heckel@intel.com> | 2019-02-27 15:21:12 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2019-06-11 19:20:09 +0100 |
commit | a5fd13a91534b1c79a4b61995894a5bb4f08d3b0 (patch) | |
tree | ccca118c9784175d6a3a5f27f9f26c9c16079eb0 /gdb/cli/cli-utils.c | |
parent | 2057d69dccf36206be3bec5d48ff165621e9a06c (diff) | |
download | gdb-a5fd13a91534b1c79a4b61995894a5bb4f08d3b0.zip gdb-a5fd13a91534b1c79a4b61995894a5bb4f08d3b0.tar.gz gdb-a5fd13a91534b1c79a4b61995894a5bb4f08d3b0.tar.bz2 |
Dwarf: Don't add nameless modules to partial symbol table
A name for BLOCK DATA in Fortran is optional. If no name has been
assigned, GDB crashes during read-in of DWARF when BLOCK DATA is
represented via DW_TAG_module. BLOCK DATA is used for one-time
initialization of non-pointer variables in named common blocks.
As of now there is no issue when gfortran is used as DW_TAG_module is
not emitted. However, with Intel ifort the nameless DW_TAG_module is
present and has the following form:
...
<1><dd>: Abbrev Number: 7 (DW_TAG_module)
<de> DW_AT_decl_line : 46
<df> DW_AT_decl_file : 1
<e0> DW_AT_description : (indirect string, offset: 0x110): block
data
<e4> DW_AT_high_pc : 0x402bb7
<ec> DW_AT_low_pc : 0x402bb7
...
The missing name leads to a crash in add_partial_symbol, during length
calculation.
gdb/ChangeLog:
2019-06-11 Bernhard Heckel <bernhard.heckel@intel.com>
* dwarf2read.c (add_partial_symbol): Skip nameless modules.
gdb/testsuite/Changelog:
2019-06-11 Bernhard Heckel <bernhard.heckel@intel.com>
* gdb.fortran/block-data.f: New.
* gdb.fortran/block-data.exp: New.
Diffstat (limited to 'gdb/cli/cli-utils.c')
0 files changed, 0 insertions, 0 deletions