Results 1 to 18 of 18

Thread: Can't get qdevelop to debug

  1. #1
    Join Date
    Dec 2007
    Location
    Groningen Netherlands
    Posts
    182
    Thanks
    16
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Can't get qdevelop to debug

    I am *almost* sure I meet all requirements.

    Qt on linux is with debug info.
    dbg is installed.
    The project is in debugmode.

    If I put a breakpoint in main, as shown here http://qdevelop.free.fr/doc-en.php#mozTocId388196
    and start debugging, nothing happens, no blue line, the program just runs.

    The outputwindow displays a few times (dbg) so that's probably running,

    Any help appreciated.

    I'm new to linux and qt, things are going slowly enough by itself, not being able to debug wont help

    Thanks.
    Last edited by JeanC; 1st January 2008 at 18:49.

  2. #2
    Join Date
    Oct 2006
    Posts
    16
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can't get qdevelop to debug

    Hi,

    I got the same problem since a week or so.
    The project in QDevelop compile right in debug mode, the problem begins when trying to debug. It doesn't break on breakpoints.
    I create a new default project and marked 2 breakpoints in the main function, the debugger output is:

    Debug...
    Using host libthread_db library "/lib/libthread_db.so.1".
    (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) Starting program: /home/alnitak/prova/bin/prova
    [Thread debugging using libthread_db enabled]
    [New Thread 0xb6eabb90 (LWP 4472)]
    [Thread 0xb6eabb90 (LWP 4472) exited]
    Program exited normally.
    (gdb)
    Argument required (expression to compute).
    Argument required (expression to compute).
    Qt: gdb: -nograb added to command-line options.
    Use the -dograb option to enforce grabbing.
    ---------------------- Debug exited ----------------------

    this output is displayed when I close the application.
    I use debian testing and gdb version is 6.6.90.20070912-debian.
    QDevelop is 0.25 also tried svn 0.26
    I tried also with gdb 6.7.1 and recompiled version of 6.3, but nothing better with QDevelop. Within the shell gdb stops and exit.
    I'm thinking its a problem related to libthread but don't know what else to try.
    Any help appreciated.
    Last edited by Alnitak; 3rd January 2008 at 20:16.

  3. #3
    Join Date
    Jan 2006
    Posts
    156
    Thanked 12 Times in 12 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can't get qdevelop to debug

    Argument required (expression to compute).
    Argument required (expression to compute).
    These two lines seems to say a problem to accept both breakpoints by gdb. I read somewhere that the 6.7.0 and 6.7.1 was bugged (http://www.kdevelop.org/index.html?f...ml&set_lang=en). I don't know if it's the cause of problem, but perhaps.
    QDevelop, an complete Integrated Development Environment for Qt 4: http://qdevelop.org

  4. #4
    Join Date
    Jan 2006
    Posts
    156
    Thanked 12 Times in 12 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can't get qdevelop to debug

    On my Ubuntu 7.10, I built gdb 6.7.1 and the programs are correctly stopped with it. This version of gdb works fine, finaly. So, what is the problem?
    Please try to launch your program in gdb in a terminal then enter:
    Qt Code:
    1. break main.cpp:8
    To copy to clipboard, switch view to plain text mode 
    then run it.
    8 is the line number in the main function, change it if the line 8 doesn't exists. You have added the breakpoint in the same way that is made in qdevelop. Say me the results, please.
    QDevelop, an complete Integrated Development Environment for Qt 4: http://qdevelop.org

  5. #5
    Join Date
    Jan 2006
    Posts
    368
    Thanks
    14
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can't get qdevelop to debug

    This is not working (from QDevelop) on my system, using gdb 6.6.dfsg-1ubuntu7.

  6. #6
    Join Date
    Jan 2006
    Posts
    156
    Thanked 12 Times in 12 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can't get qdevelop to debug

    Curious because I have exactly the same system (Ubuntu 7.10) and the same version of gdb and that works for me. The programs stops fine on the breakpoints.
    QDevelop, an complete Integrated Development Environment for Qt 4: http://qdevelop.org

  7. #7
    Join Date
    Jan 2006
    Posts
    156
    Thanked 12 Times in 12 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can't get qdevelop to debug

    Please in debug.cpp:117 try to replace toLatin1() by toLocal8Bit() or toUtf8()
    QDevelop, an complete Integrated Development Environment for Qt 4: http://qdevelop.org

  8. #8
    Join Date
    Jan 2006
    Posts
    368
    Thanks
    14
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can't get qdevelop to debug

    Both are not working and I get:
    Qt Code:
    1. Argument required (expression to compute).
    To copy to clipboard, switch view to plain text mode 

  9. #9
    Join Date
    Jan 2006
    Posts
    156
    Thanked 12 Times in 12 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can't get qdevelop to debug

    Now add below "qDebug() << msg" and say me the result. Thanks
    QDevelop, an complete Integrated Development Environment for Qt 4: http://qdevelop.org

  10. #10
    Join Date
    Oct 2006
    Posts
    16
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can't get qdevelop to debug

    this is what happens for me with toUtf8()

    ./bin/qdevelop
    "watch
    "
    "set pagination off
    "
    "set width 0
    "
    "set height 0
    "
    "set complaints 0
    "

    the same with toLatin1()

  11. #11
    Join Date
    Jan 2006
    Posts
    156
    Thanked 12 Times in 12 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can't get qdevelop to debug

    ok thanks. I modified the code for the breakpoints. Please download the lasted svn version by "svn checkout http://qdevelop.googlecode.com/svn/trunk/ qdevelop-read-only" and try with it. Perhaps a solution...
    QDevelop, an complete Integrated Development Environment for Qt 4: http://qdevelop.org

  12. #12
    Join Date
    Oct 2006
    Posts
    16
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can't get qdevelop to debug

    I downloaded the svn version, but unluck with the result.
    I think is some kind of problem related to latest packages in the debian repositories ( last week, before some updates, all working ), maybe some locales or even something related to libc6 ( I m not a geek).
    I tried to do debug slotBreakpoint() (at debug.cpp:405) adding these line at the end of the function:

    qDebug() << "point:"+point;
    qDebug() << "Line:"+QString::number(line);
    qDebug() << "Filename:"+filename;
    qDebug() << "blockUserData->breakpointCondition:"+blockUserData->breakpointCondition;
    qDebug() << "blockUserData->breakpoint:"+QString::number(blockUserData->breakpoint);
    qDebug() << "blockUserData->isTrue:"+QString::number(blockUserData->isTrue);

    the output is:

    "point:watch
    "
    "Line:8"
    "Filename:main.cpp"
    "blockUserData->breakpointCondition:"
    "blockUserData->breakpoint:1"
    "blockUserData->isTrue:0"

    so if I change the line 410 with:
    if( !blockUserData->isTrue )
    it breaks.

    I'll looking for that 'isTrue' condition later and I'll let u know.

    p.s.: great work and great project

  13. #13
    Join Date
    Oct 2006
    Posts
    16
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can't get qdevelop to debug

    maybe some good news.
    I monitored the function

    LineNumbers::slotToggleBreakpoint()

    and it does't toggle isTrue variable when pressing F9 but it does when select the mode in context menu.
    I'll go ahead triing to discover some strange behaviours like version 0.25 working right before the updates or when debgging a qt application gdb stopped and when close the shell the application start.

    thanks

  14. #14
    Join Date
    Jan 2006
    Posts
    156
    Thanked 12 Times in 12 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can't get qdevelop to debug

    Ok it's found and fixed. Two way was possible to toggle a breakpoint, with the mouse which works well, and with the menubar which not works properly. Now it's normaly fixed. Please try the last svn and confirm.
    QDevelop, an complete Integrated Development Environment for Qt 4: http://qdevelop.org

  15. The following user says thank you to jlbrd for this useful post:

    Alnitak (6th January 2008)

  16. #15
    Join Date
    Oct 2006
    Posts
    16
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can't get qdevelop to debug

    works smoothly

    thanks

  17. #16
    Join Date
    Jan 2006
    Posts
    368
    Thanks
    14
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can't get qdevelop to debug

    BTW, middle clicking a line number will trigger a breakpoint.

    Homework:
    Middle click is used in QDevelop quite a lot. Please mention 2 more pleaces in which it's used.

  18. #17
    Join Date
    Dec 2007
    Location
    Groningen Netherlands
    Posts
    182
    Thanks
    16
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can't get qdevelop to debug

    I was surprised checking here again that this thread is still alive, I thought it was dead after I posted my first post here.
    I downloaded the svn and it stops on the breakpoint and lets me step!
    I'm very pleased. Learning Qt and using QDevelop is what I have been doing for weeks now and porting all my stuff from windows is alot of fun.

    I thought i mentioned that I get these:

    Scope for 186:
    Symbol this is a variable with complex or multiple locations (DWARF2), length 4.
    Symbol moviename is a variable with complex or multiple locations (DWARF2), length 4.
    Symbol jpgmap is a variable with complex or multiple locations (DWARF2), length 4.
    Symbol map is a variable with complex or multiple locations (DWARF2), length 4.
    Symbol names is a variable with complex or multiple locations (DWARF2), length 4.
    Symbol n is a variable with complex or multiple locations (DWARF2), length 4.
    (gdb)

    Thanks jlbrd, keep up the good work, very nice ide.
    Jean.
    Last edited by JeanC; 30th January 2008 at 11:12.

  19. #18
    Join Date
    Apr 2008
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Talking Re: Can't get qdevelop to debug

    Thanks a lot for this fix. I got the latest from svn and it worked perfectly.
    Thanks again.

Similar Threads

  1. Replies: 2
    Last Post: 8th November 2007, 21:15
  2. What is debug mode for without MSVC?
    By firegun9 in forum Newbie
    Replies: 1
    Last Post: 5th September 2007, 18:21
  3. Qt4 open src mingw from a PC to another
    By nvictor in forum Installation and Deployment
    Replies: 11
    Last Post: 1st May 2007, 18:41
  4. Adding custom defines when on debug build
    By chus in forum Qt Programming
    Replies: 2
    Last Post: 2nd March 2007, 12:38
  5. Replies: 11
    Last Post: 22nd March 2006, 20:06

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.