×

Discussion Board

Results 1 to 2 of 2

Hybrid View

  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    2

    Debug .so file created with Boost.Python from QtCreator

    I have created a Python module using Boost.Python. I want to debug this module using QtCreator. The module is simply a MyModule.so file.

    In Python, I will do

    import MyModule
    a = MyModule.MyObject()
    a.do_something()

    The do_something method is implemented in C++ and I want to debug it. Does any have a recommendation on how to achieve this?

  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    82

    Re: Debug .so file created with Boost.Python from QtCreator

    You need to launch "python" executable in the debugger, then set breakpoint on do_something (e.g. with "rbreak do_something").

    rbreak is a gdb command - you can execute gdb commands by enabling Window -> View -> Log, entering the command to the log pane that pops up, and pressing ctrl+enter.

    In your case, though, it may just be easier to use cgdb or plain gdb.

    EDIT:

    - You need to ensure that your module has been loaded before invoking "rbreak". You can do this by letting your program run for a while (without entering the position where do_something is called), then interrupting the debugger (shift+f5, or ctrl+c in cgdb).
    - If you just want to track a crash, you don't need to set breakpoints, just do post-mortem analysis of the program. If you don't know how to do this, let us know.
    Last edited by vivainio; 2010-10-18 at 10:02.

Similar Threads

  1. QtCreator Could not create file on device
    By Fillinger in forum [Archived] Qt SDKs and Tools
    Replies: 1
    Last Post: 2010-08-04, 15:49
  2. debug output from python on s.60 emulator
    By spulukuru in forum Symbian
    Replies: 0
    Last Post: 2007-02-28, 19:53
  3. Python Created a Problem
    By sagars in forum Symbian
    Replies: 7
    Last Post: 2006-11-22, 10:30
  4. Python created sis-file problem
    By big_pig in forum Symbian
    Replies: 4
    Last Post: 2006-10-18, 10:48

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×