bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gdb mi variables


From: Andre Poenitz
Subject: gdb mi variables
Date: Tue, 18 Mar 2008 23:37:09 +0100
User-agent: tin/1.9.2-20070201 ("Dalaruan") (UNIX) (Linux/2.6.22-14-generic (i686))

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'




reply via email to

[Prev in Thread] Current Thread [Next in Thread]