public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/24154] "auto" return type on template class methods prevents gdb from being able to print their return values
       [not found] <bug-24154-4717@http.sourceware.org/bugzilla/>
@ 2020-08-08 12:38 ` trass3r at gmail dot com
  2020-08-09 14:32 ` tromey at sourceware dot org
  1 sibling, 0 replies; 2+ messages in thread
From: trass3r at gmail dot com @ 2020-08-08 12:38 UTC (permalink / raw)
  To: gdb-prs

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

trass3r <trass3r at gmail dot com> changed:

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

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

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

* [Bug c++/24154] "auto" return type on template class methods prevents gdb from being able to print their return values
       [not found] <bug-24154-4717@http.sourceware.org/bugzilla/>
  2020-08-08 12:38 ` [Bug c++/24154] "auto" return type on template class methods prevents gdb from being able to print their return values trass3r at gmail dot com
@ 2020-08-09 14:32 ` tromey at sourceware dot org
  1 sibling, 0 replies; 2+ messages in thread
From: tromey at sourceware dot org @ 2020-08-09 14:32 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

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

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
The compiler emits a pretty bogus-looking return type for the operator:

 <2><43>: Abbrev Number: 4 (DW_TAG_subprogram)
    <44>   DW_AT_external    : 1
    <44>   DW_AT_name        : (indirect string, offset: 0x20): operator[]
...
    <4f>   DW_AT_type        : <0x80>


 <1><80>: Abbrev Number: 11 (DW_TAG_reference_type)
    <81>   DW_AT_byte_size   : 8
    <82>   DW_AT_type        : <0x7b>

Ok so far, but look at 7b:

 <1><7b>: Abbrev Number: 10 (DW_TAG_unspecified_type)
    <7c>   DW_AT_name        : (indirect string, offset: 0x2b): auto


What I would expect here is for the compiler to replace "auto"
with the concrete type of the instantiation.  Using "auto"
and having it be an unspecified type seems incorrect.  Also,
gdb doesn't have enough information to deduce the actual type.

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

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

end of thread, other threads:[~2020-08-09 14:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-24154-4717@http.sourceware.org/bugzilla/>
2020-08-08 12:38 ` [Bug c++/24154] "auto" return type on template class methods prevents gdb from being able to print their return values trass3r at gmail dot com
2020-08-09 14:32 ` tromey at sourceware dot org

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