public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12933] New: template parameter member function pointer not displayed
@ 2011-06-26 13:32 jan.kratochvil at redhat dot com
  2011-08-04 14:38 ` [Bug c++/12933] " tromey at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-06-26 13:32 UTC (permalink / raw)
  To: gdb-prs

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

           Summary: template parameter member function pointer not
                    displayed
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned@sourceware.org
        ReportedBy: jan.kratochvil@redhat.com


struct S {
  void m (int x) {}
};
template<int X,void (S::*F) (int)>
struct K {
  void f () { S s; (s.*F) (5); }
};
int main () {
  K<1,&S::m> k;
  k.f ();
}

#1  0x000000000040051b in K<1, &(S::m)>::f (this=0x7fffffffdcaf) at
tmplmember.C:6
6      void f () { S s; (s.*F) (5); }
(gdb) p F
$1 = <optimized out>
(gdb) p &F
Can't take address of "F" which isn't an lvalue.
(gdb) ptype F
type = void (S::*)(S * const, int)

It displays the type but it could display something like:
(gdb) p F
$1 = {void (S * const, int)} 0x4004f0 <S::m(int)>

-- 
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] 4+ messages in thread

* [Bug c++/12933] template parameter member function pointer not displayed
  2011-06-26 13:32 [Bug c++/12933] New: template parameter member function pointer not displayed jan.kratochvil at redhat dot com
@ 2011-08-04 14:38 ` tromey at redhat dot com
  2020-04-05 10:17 ` ssbssa at sourceware dot org
  2020-04-06  9:28 ` jan.kratochvil at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: tromey at redhat dot com @ 2011-08-04 14:38 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at redhat dot com

--- Comment #1 from Tom Tromey <tromey at redhat dot com> 2011-08-04 14:37:55 UTC ---
I'm surprised that ptype works here.
Anyway it is a gcc bug:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49366

-- 
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] 4+ messages in thread

* [Bug c++/12933] template parameter member function pointer not displayed
  2011-06-26 13:32 [Bug c++/12933] New: template parameter member function pointer not displayed jan.kratochvil at redhat dot com
  2011-08-04 14:38 ` [Bug c++/12933] " tromey at redhat dot com
@ 2020-04-05 10:17 ` ssbssa at sourceware dot org
  2020-04-06  9:28 ` jan.kratochvil at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: ssbssa at sourceware dot org @ 2020-04-05 10:17 UTC (permalink / raw)
  To: gdb-prs

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

Hannes Domani <ssbssa at sourceware dot org> changed:

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

--- Comment #2 from Hannes Domani <ssbssa at sourceware dot org> ---
(In reply to Tom Tromey from comment #1)
> I'm surprised that ptype works here.
> Anyway it is a gcc bug:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49366

The gcc bug was fixed 4 years ago, and it works fine in gdb now:

(gdb) p F
$1 = (void (S::*)(S * const, int)) 0x402b50 <S::m(int)>
(gdb) p &f
$2 = (void (*)(K<1, &S::m> * const)) 0x402b20 <K<1, &S::m>::f()>

So can this be closed?

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

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

* [Bug c++/12933] template parameter member function pointer not displayed
  2011-06-26 13:32 [Bug c++/12933] New: template parameter member function pointer not displayed jan.kratochvil at redhat dot com
  2011-08-04 14:38 ` [Bug c++/12933] " tromey at redhat dot com
  2020-04-05 10:17 ` ssbssa at sourceware dot org
@ 2020-04-06  9:28 ` jan.kratochvil at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: jan.kratochvil at redhat dot com @ 2020-04-06  9:28 UTC (permalink / raw)
  To: gdb-prs

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

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jan.kratochvil at redhat dot com
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Jan Kratochvil <jan.kratochvil at redhat dot com> ---
Yes, fixed probably in GCC.

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

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

end of thread, other threads:[~2020-04-06  9:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-26 13:32 [Bug c++/12933] New: template parameter member function pointer not displayed jan.kratochvil at redhat dot com
2011-08-04 14:38 ` [Bug c++/12933] " tromey at redhat dot com
2020-04-05 10:17 ` ssbssa at sourceware dot org
2020-04-06  9:28 ` jan.kratochvil 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).