Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Dumpers not working on OSX. :(

Dumpers not working on OSX. :(

Scheduled Pinned Locked Moved General and Desktop
dumpersosx yosemite
1 Posts 1 Posters 600 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hackdev
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved