This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/12933] New: template parameter member function pointer notdisplayed


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]