public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15372] New: ref qualifiers and overloading
@ 2013-04-15 20:07 tromey at redhat dot com
  2013-04-15 20:07 ` [Bug c++/15372] " tromey at redhat dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: tromey at redhat dot com @ 2013-04-15 20:07 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15372

             Bug #: 15372
           Summary: ref qualifiers and overloading
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned@sourceware.org
        ReportedBy: tromey@redhat.com
    Classification: Unclassified


C++11 added "&" and "&&" ref qualifiers.
These are used in overload resolution.
There isn't any DWARF support for them yet, see
  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56974
But once this information is available, gdb should use it.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug c++/15372] ref qualifiers and overloading
  2013-04-15 20:07 [Bug c++/15372] New: ref qualifiers and overloading tromey at redhat dot com
@ 2013-04-15 20:07 ` tromey at redhat dot com
  2013-10-31 19:44 ` tromey at redhat dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: tromey at redhat dot com @ 2013-04-15 20:07 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15372

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |archer
           See Also|                            |http://gcc.gnu.org/bugzilla
                   |                            |/show_bug.cgi?id=56974

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug c++/15372] ref qualifiers and overloading
  2013-04-15 20:07 [Bug c++/15372] New: ref qualifiers and overloading tromey at redhat dot com
  2013-04-15 20:07 ` [Bug c++/15372] " tromey at redhat dot com
@ 2013-10-31 19:44 ` tromey at redhat dot com
  2023-12-23 12:21 ` ssbssa at sourceware dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: tromey at redhat dot com @ 2013-10-31 19:44 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |16106

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


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

* [Bug c++/15372] ref qualifiers and overloading
  2013-04-15 20:07 [Bug c++/15372] New: ref qualifiers and overloading tromey at redhat dot com
  2013-04-15 20:07 ` [Bug c++/15372] " tromey at redhat dot com
  2013-10-31 19:44 ` tromey at redhat dot com
@ 2023-12-23 12:21 ` ssbssa at sourceware dot org
  2026-03-17 18:10 ` cvs-commit at gcc dot gnu.org
  2026-03-31 18:16 ` keiths at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: ssbssa at sourceware dot org @ 2023-12-23 12:21 UTC (permalink / raw)
  To: gdb-prs

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

Hannes Domani <ssbssa at sourceware dot org> changed:

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

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

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

* [Bug c++/15372] ref qualifiers and overloading
  2013-04-15 20:07 [Bug c++/15372] New: ref qualifiers and overloading tromey at redhat dot com
                   ` (2 preceding siblings ...)
  2023-12-23 12:21 ` ssbssa at sourceware dot org
@ 2026-03-17 18:10 ` cvs-commit at gcc dot gnu.org
  2026-03-31 18:16 ` keiths at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2026-03-17 18:10 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Keith Seitz <kseitz@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=883363daadfa6fc4f9221546f448bfa6a87dd447

commit 883363daadfa6fc4f9221546f448bfa6a87dd447
Author: Keith Seitz <keiths@redhat.com>
Date:   Thu Oct 16 08:29:05 2025 -0700

    infcall: Add support for integer literals as reference function parameters

    This patch attempts to mitigate the shortcomings of passing literals
    to inferior function calls requiring references.  The specific use case
here
    is std::map's operator[]:

    std::map int_map<int, int>;
    int_map[1] = 10;
    (gdb) print int_map[1]
    Attempt to take address of value not located in memory.

    This is occurring because while value_coerce_to_target understands
    that some values need to be allocated and copied to the inferior's
    memory, it only considers the actual parsed type of the argument value,
    ignoring the actual type of the function parameter. That is,
    in this specific case, the value's parsed type is TYPE_CODE_INT, but
    the function requires TYPE_CODE_REF. We need to account for the
    reference.

    In value_arg_coerce, we have special handling for references, but it
    has not specifically dealt with this case. It now checks if the
    reference is in memory, and if it isn't, it copies it, if the type
    is trivially copyable.

    As a result of this patch, the last remaining failure in c++/15372 is now
    fixed, and that bug can be closed.

    With this patch, we can now print map entries with integer keys:

    (gdb) print int_map[1]
    $1 = (std::map<int, int, std::less<int>, std::allocator<std::pair<int
const, int> > >::mapped_type &) @0x41f2d4: 10

    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=15372
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=25957
    Approved-By: Andrew Burgess <aburgess@redhat.com>

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

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

* [Bug c++/15372] ref qualifiers and overloading
  2013-04-15 20:07 [Bug c++/15372] New: ref qualifiers and overloading tromey at redhat dot com
                   ` (3 preceding siblings ...)
  2026-03-17 18:10 ` cvs-commit at gcc dot gnu.org
@ 2026-03-31 18:16 ` keiths at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: keiths at redhat dot com @ 2026-03-31 18:16 UTC (permalink / raw)
  To: gdb-prs

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

Keith Seitz <keiths at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #3 from Keith Seitz <keiths at redhat dot com> ---
The last issues should now be resolved, and the KFAILs
have been removed.

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

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

end of thread, other threads:[~2026-03-31 18:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-15 20:07 [Bug c++/15372] New: ref qualifiers and overloading tromey at redhat dot com
2013-04-15 20:07 ` [Bug c++/15372] " tromey at redhat dot com
2013-10-31 19:44 ` tromey at redhat dot com
2023-12-23 12:21 ` ssbssa at sourceware dot org
2026-03-17 18:10 ` cvs-commit at gcc dot gnu.org
2026-03-31 18:16 ` keiths at redhat 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).