public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/20540] Type printer template parameter substitution too greedy
       [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
  2022-03-29 16:39 ` nils-christian.kempke at intel dot com
  2 siblings, 0 replies; 3+ messages in thread
From: ssbssa at sourceware dot org @ 2020-04-05 15:22 UTC (permalink / raw)
  To: gdb-prs

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

Hannes Domani <ssbssa at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ssbssa at sourceware dot org

--- Comment #1 from Hannes Domani <ssbssa at sourceware dot org> ---
Both A::val_ and A::val2_ have basically the same debug information, so there
is now way that gdb could know that only A::val_ was originally a T:

        .uleb128 0x7     # (DIE (0xf7) DW_TAG_member)
        .ascii "val_\0"  # DW_AT_name
        .byte   0x1      # DW_AT_decl_file (gdb-20540.cpp)
        .byte   0x7      # DW_AT_decl_line
        .byte   0x5      # DW_AT_decl_column
        .long   0x12c    # DW_AT_type
        .byte   0        # DW_AT_data_member_location
        .uleb128 0x7     # (DIE (0x105) DW_TAG_member)
        .ascii "val2_\0"         # DW_AT_name
        .byte   0x1      # DW_AT_decl_file (gdb-20540.cpp)
        .byte   0x8      # DW_AT_decl_line
        .byte   0x7      # DW_AT_decl_column
        .long   0x12c    # DW_AT_type
        .byte   0x4      # DW_AT_data_member_location

Both have DW_AT_type 0x12c, which is int in this case:

        .uleb128 0xb     # (DIE (0x12c) DW_TAG_base_type)
        .byte   0x4      # DW_AT_byte_size
        .byte   0x5      # DW_AT_encoding
        .ascii "int\0"   # DW_AT_name

And it's the same for A::get and A::add.

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

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

* [Bug c++/20540] Type printer template parameter substitution too greedy
       [not found] <bug-20540-4717@http.sourceware.org/bugzilla/>
  2020-04-05 15:22 ` [Bug c++/20540] Type printer template parameter substitution too greedy ssbssa at sourceware dot org
@ 2022-03-29 16:31 ` nils-christian.kempke at intel dot com
  2022-03-29 16:39 ` nils-christian.kempke at intel dot com
  2 siblings, 0 replies; 3+ messages in thread
From: nils-christian.kempke at intel dot com @ 2022-03-29 16:31 UTC (permalink / raw)
  To: gdb-prs

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.

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

* [Bug c++/20540] Type printer template parameter substitution too greedy
       [not found] <bug-20540-4717@http.sourceware.org/bugzilla/>
  2020-04-05 15:22 ` [Bug c++/20540] Type printer template parameter substitution too greedy ssbssa at sourceware dot org
  2022-03-29 16:31 ` nils-christian.kempke at intel dot com
@ 2022-03-29 16:39 ` nils-christian.kempke at intel dot com
  2 siblings, 0 replies; 3+ messages in thread
From: nils-christian.kempke at intel dot com @ 2022-03-29 16:39 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from Kempke, Nils-Christian <nils-christian.kempke at intel dot com> ---
The GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57006

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

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

end of thread, other threads:[~2022-03-29 16:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-20540-4717@http.sourceware.org/bugzilla/>
2020-04-05 15:22 ` [Bug c++/20540] Type printer template parameter substitution too greedy ssbssa at sourceware dot org
2022-03-29 16:31 ` nils-christian.kempke at intel dot com
2022-03-29 16:39 ` nils-christian.kempke at intel dot com

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