Results 1 to 5 of 5

Thread: gdb doubt for Qt programing

  1. #1
    Join Date
    Jul 2007
    Posts
    39
    Thanks
    10

    Default gdb doubt for Qt programing

    Hi

    I want to debug my Qt code using GDB. I want to set breakpoints in the code.

    When I googled i found the following command : break filename:functionName. But it does not work. So how should I use this command.

    Kindly help with your suggestions.

    Thanks
    Arjun

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: gdb doubt for Qt programing

    Is the application compiled in debug (-g) mode?

    Try:
    qmake -config debug
    and rebuild the app.
    J-P Nurmi

  3. #3
    Join Date
    Jul 2007
    Posts
    39
    Thanks
    10

    Default Re: gdb doubt for Qt programing

    Yes. I did that but still it does not pick up the functions.

    Setting breakpoints using filename:line number works but not filename:function name.

    Kindly help me with suggestions if possible.

    Thanks
    Arjun

  4. #4
    Join Date
    Feb 2006
    Location
    Jarrell, Texas, USA
    Posts
    70
    Thanks
    7
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: gdb doubt for Qt programing

    This may seem like a bit of overkill, but consider downloading and installing QDevelop (www.qdevelop.org). It is a nice, easy to use IDE that provides debugging through gdb right in the GUI.

    Karl

  5. The following user says thank you to KaptainKarl for this useful post:

    arjunasd (26th July 2007)

  6. #5
    Join Date
    Apr 2007
    Posts
    23
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Thumbs up Re: gdb doubt for Qt programing

    Quote Originally Posted by KaptainKarl View Post
    This may seem like a bit of overkill, but consider downloading and installing QDevelop (www.qdevelop.org). It is a nice, easy to use IDE that provides debugging through gdb right in the GUI.

    Karl
    I use this daily for writing and debugging. Works great. It has a gdb commandline where you can enter gdb specific commands or just use the IDE debug buttons.

Similar Threads

  1. Problem with SqLite and Qt
    By ad5xj in forum Newbie
    Replies: 26
    Last Post: 5th June 2007, 01:53
  2. Previous frame inner to this frame(corrupt stack?)
    By coralbird in forum Qt Programming
    Replies: 1
    Last Post: 28th May 2007, 01:35
  3. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.