public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Nils-Christian Kempke <nils-christian.kempke@intel.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/1] Handle undnamed template tags in GDB
Date: Thu,  7 Jul 2022 16:17:21 +0200	[thread overview]
Message-ID: <20220707141722.1114229-1-nils-christian.kempke@intel.com> (raw)

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


             reply	other threads:[~2022-07-07 14:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-07 14:17 Nils-Christian Kempke [this message]
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

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=20220707141722.1114229-1-nils-christian.kempke@intel.com \
    --to=nils-christian.kempke@intel.com \
    --cc=gdb-patches@sourceware.org \
    /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).