public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "nils-christian.kempke at intel dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug c++/20540] Type printer template parameter substitution too greedy
Date: Tue, 29 Mar 2022 16:31:11 +0000	[thread overview]
Message-ID: <bug-20540-4717-UfAGleUDDJ@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-20540-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=20540

Kempke, Nils-Christian <nils-christian.kempke at intel dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nils-christian.kempke@intel
                   |                            |.com

--- Comment #2 from Kempke, Nils-Christian <nils-christian.kempke at intel dot com> ---
While I agree that in this case GDB should probably print int over T, there is
actually a bug in gcc here as well.

The emitted DWARF as pointed out by Hannes does not allow for correct
resolution. Looking at the DWARF v5 D.11 examples the gcc should have
referenced the DW_TAG_template_type_param as val_'s DW_AT_type instead of
referencing the generic int.

On the other hand, GDB should not have just resolved all int to T but instead
only for those variables that actually reference the DW_TAG_template_type_param
as their DW_AT_type.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-03-29 16:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-20540-4717@http.sourceware.org/bugzilla/>
2020-04-05 15:22 ` ssbssa at sourceware dot org
2022-03-29 16:31 ` nils-christian.kempke at intel dot com [this message]
2022-03-29 16:39 ` nils-christian.kempke at intel dot com

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=bug-20540-4717-UfAGleUDDJ@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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).