Dumpers not working on OSX. :(



  • Hi,

    I was trying to get the Dumpers to work on OSX Yosemite based on the information found here: http://doc.qt.io/qtcreator/creator-debugging-helpers.html
    However for some reason they aren't working, and there seems to be no error.

    Here's my test code:
    #include <iostream>
    using namespace std;

    struct vec3 {
    vec3(const float& x = 0.0f,
    const float& y = 0.0f,
    const float& z = 0.0f)
    : x(x)
    , y(y)
    , z(z)
    {}

    float x, y, z;
    

    };

    int main(int, char**) {
    vec3 v;
    cout << v.x << ' ' << v.y << ' ' << v.z << endl;
    return 0;
    }


    And here's my dumpers:
    #!/usr/bin/python

    def qdump__vec3(d, value):
    x = value["x"]
    y = value["y"]
    z = value["z"]
    d.putValue('(%.3f, %.3f, %.3f)' % (x, y, z))
    d.putType("vec3")
    d.putAddress(value.address)
    d.putNumChild(0)


    I tried to load the dumpers by putting
    python execfile('/path/to/file/DebugHelpers.py')
    in both ~/.gdbinit and "Additional Startup Commands".
    In both cases the debugger log prints:
    GdbStartupCommands: python execfile('/path/to/file/DebugHelpers.py') (default: ) ***
    But the type is not printed according to the qdump__vec3.

    Am I doing something wrong here?
    Thank you for your time.

    System: I installed Qt5.4.1 and which comes with QtCreator 3.4. Also installed X-Code 6.3.1.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.