public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Handle undnamed template tags in GDB
@ 2022-07-07 14:17 Nils-Christian Kempke
  2022-07-07 14:17 ` [PATCH 1/1] gdb, dwarf: create symbols for template tags without names Nils-Christian Kempke
  0 siblings, 1 reply; 4+ messages in thread
From: Nils-Christian Kempke @ 2022-07-07 14:17 UTC (permalink / raw)
  To: gdb-patches

Hi,

please find attached a patch designed to make GDB recored template tags
like DW_TAG_template_type_parameter and DW_TAG_tempolate_value_parameter
even if they do not have a name in the compiler's DWARF.

According to DWARF 5 unnnamed template TAGs are valid DWARF.  However,
GDB does not record symbols that do not have names and as such, did not
record these template arguments.

This patch adds an artificial naming scheme for unnamed template TAGs.
It fixes a reported bug and improves GDB's handling of templates.


Tested on x86-64 Ubuntu 20 with unix, unix/-m32, native-gdbserver and
native-extended-gdbserver.

Cheers,
Nils

Nils-Christian Kempke (1):
  gdb, dwarf: create symbols for template tags without names

 gdb/dwarf2/read.c                             |  46 ++++-
 .../missing-type-name-for-templates.exp       | 166 ++++++++++++++++++
 2 files changed, 211 insertions(+), 1 deletion(-)
 create mode 100644 gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp

-- 
2.25.1

Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-14  7:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-07 14:17 [PATCH 0/1] Handle undnamed template tags in GDB Nils-Christian Kempke
2022-07-07 14:17 ` [PATCH 1/1] gdb, dwarf: create symbols for template tags without names Nils-Christian Kempke
2022-07-13 19:08   ` Bruno Larsen
2022-07-14  7:33     ` Kempke, Nils-Christian

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).