public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "dblaikie at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug c++/28946] Missing template paramater pack support
Date: Thu, 27 Oct 2022 21:56:51 +0000	[thread overview]
Message-ID: <bug-28946-4717-pRyOcoFQh4@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28946-4717@http.sourceware.org/bugzilla/>

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

David Blaikie <dblaikie at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dblaikie at gmail dot com

--- Comment #2 from David Blaikie <dblaikie at gmail dot com> ---
+1 to this from a Clang developer.

Clang does name the template parameter pack.
```
0x0000039a:   DW_TAG_structure_type
                DW_AT_name      ("single_and_pack<int, int>")
                DW_AT_byte_size (1)
                DW_AT_decl_file
("/usr/local/google/home/blaikie/dev/scratch/test.cpp")
                DW_AT_decl_line (9)
                DW_AT_decl_column       (8)
                DW_AT_sibling   (0x000003b7)

0x000003a4:     DW_TAG_template_type_parameter
                  DW_AT_name    ("T1")
                  DW_AT_type    (0x00000094 "int")

0x000003ac:     DW_TAG_GNU_template_parameter_pack
                  DW_AT_name    ("Ts")

0x000003b0:       DW_TAG_template_type_parameter
                    DW_AT_type  (0x00000094 "int")

0x000003b5:       NULL

0x000003b6:     NULL
```

And there's an extra bonus reason from Clang's side:

I'm working on a mode for clang (called -gsimple-template-names) that will
produce DW_AT_names for templates without template parameters in some cases (so
in the above example "single_and_pack") and so working around this bug (missing
structural/API access to template parameters) by using the string name won't be
possible with debug info like this)

(total aside, though this is probably for a conversation on a gdb mailing list
- it does look like gdb does quite a bit of work that looks /a lot/ like it's
intending to support debug info like I described above... anyone happen to have
context on that?)

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

  parent reply	other threads:[~2022-10-27 21:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-05 16:08 [Bug gdb/28946] New: " jengelh at inai dot de
2022-03-06 14:20 ` [Bug gdb/28946] " ssbssa at sourceware dot org
2022-03-06 14:55 ` ssbssa at sourceware dot org
2022-03-06 16:49 ` [Bug c++/28946] " tromey at sourceware dot org
2022-10-27 21:56 ` dblaikie at gmail dot com [this message]
2023-01-14 12:58 ` ssbssa at sourceware dot org
2023-01-14 19:13 ` dblaikie at gmail dot com
2023-01-16 23:37 ` tromey at sourceware dot org
2023-01-17  1:00 ` ed at catmur dot uk

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-28946-4717-pRyOcoFQh4@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).