I have the following code compiled with gcc 4.1.3 (-g) and run in 
gdb 6.6 (debian) (it's similar for stock 6.7 as far as I can tell)


        struct Foo {
                                        int x(double d) { return int(d); }
        };

        int main()
        {
                                        Foo f;
                                        int s = f.x(1.0);

                                        int (Foo::*q)(double) = &Foo::x;
                                        int t = (f.*q)(2.0);
        }


With  gdb -i mi  I get after the assignment to q:


        (gdb)
        p q
        ~"$1 = (int ( Foo::*)(double,"
        ~")) &Foo::x(double)\n"

        (gdb)
        -var-create q * q
        ^done,name="q",numchild="1",type="int ( Foo::*)(double,)"

        (gdb)
        -var-info-type q
        ^done,type="int ( Foo::*)(double,)"

In all three responses there seems to be a superfluous comma.

Is there a simple way to get 'fixed' output, short of doing something
like  s/,)/)/g ?

Andre'


_______________________________________________
bug-gdb mailing list
bug-gdb@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gdb

Reply via email to