Results 1 to 14 of 14

Thread: KDevelop debugger setup problem

  1. #1
    Join Date
    Apr 2007
    Location
    Sunny Darwin, NT Australia
    Posts
    186
    Thanks
    29
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default KDevelop debugger setup problem

    Hi,

    I've installed KDevelop 3.4 on Ubuntu 7.04 to develop a Qt app.
    If it's relevant, I installed Qt4.3 and no Qt3.
    When I start the debug session from the IDE, I get an eror saying:

    GDB cannot use the tty* or pty* devices.
    Check the settings on /dev/tty* and /dev/pty*
    As root you may need to "chmod ug+rw" tty* and pty* devices and/or add the user to the tty group using "usermod -G tty username".

    I ran chmod and usermod scripts in a terminal window but I still get the same error.

    Can anyone help me here ?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: KDevelop debugger setup problem

    What does "ls -l /dev/{p,t}ty?" return?

  3. #3
    Join Date
    Apr 2007
    Location
    Sunny Darwin, NT Australia
    Posts
    186
    Thanks
    29
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Angry Re: KDevelop debugger setup problem

    Had more problems with ubuntu, so I installed Debian Etch instead. Seems much better. Still, debug doesn't work from the IDE, but does work directly (gdb from a console window).

    In KDevelop, debug seems to attempt to work. When started,
    I see a console window appears and disappears instantly.
    The debug floating toolbar appears.
    The breakpoints appear in the breakpoints tab and they're enabled.

    Then the app appears to exit before it starts, or maybe doesn't actually start at all, (as I've placed a line of code early in a function to beep as an audible indication that the function did get called).

    There's a message in the GDB tab:

    /bin/sh -c /bin/sh /usr/bin/gdb /home/vince/projects/rocktown/src/src --interpreter=mi2 -quiet<font color="blue">(gdb) Process exited</font>

    I've done a google for similar problems, and have read the KDevelop FAQ's more than once to see if I missed anything, but don't see anything obvious.

    What could be wrong ??

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: KDevelop debugger setup problem

    What happens if you enter that line manually from within a terminal?

  5. #5
    Join Date
    Apr 2007
    Location
    Sunny Darwin, NT Australia
    Posts
    186
    Thanks
    29
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: KDevelop debugger setup problem

    If you mean the line:

    /bin/sh -c /bin/sh /usr/bin/gdb /home/vince/projects/rocktown/src/src --interpreter=mi2 -quiet

    then all that happens is I get a sh session, prompt is:
    sh-3.1$

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: KDevelop debugger setup problem

    So now you know why it doesn't work from within KDevelop as well

    Please open the project options dialog in KDevelop, go to "Debugger" tab and check what is written in the "Debugger executable" line edit.

  7. #7
    Join Date
    Apr 2007
    Location
    Sunny Darwin, NT Australia
    Posts
    186
    Thanks
    29
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: KDevelop debugger setup problem

    Quote Originally Posted by wysota View Post
    So now you know why it doesn't work from within KDevelop as well

    Please open the project options dialog in KDevelop, go to "Debugger" tab and check what is written in the "Debugger executable" line edit.
    Debugger executable is set to:
    /home/vince/projects/rocktown/src/src

    Debugger Shell is set to:
    /bin/sh

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: KDevelop debugger setup problem

    Debugger shell should be empty and debugger executable should be set to /usr/bin/gdb.

  9. The following user says thank you to wysota for this useful post:

    vieraci (12th September 2007)

  10. #9
    Join Date
    Apr 2007
    Location
    Sunny Darwin, NT Australia
    Posts
    186
    Thanks
    29
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: KDevelop debugger setup problem

    Thanks, debug is doing something now, although I can't seem to find where the Trace window is, app doesn't appear to stop on breakpoint, AND getting KDevelop errors when trying to watch variables.

    Debugger error
    Debugger reported the following error.
    No symbol "myVariable" in current context.

    I'll see if I can figure it out from here.

  11. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: KDevelop debugger setup problem

    Make sure you compile in debug mode and that you have the debugger plugin activated for your project.

  12. #11
    Join Date
    Apr 2007
    Location
    Sunny Darwin, NT Australia
    Posts
    186
    Thanks
    29
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: KDevelop debugger setup problem

    .pro file includes:
    CONFIG += debug
    CONFIG += qt debug
    Debugger frontend is enabled in KDevelop Settings.

  13. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: KDevelop debugger setup problem

    Did you enter this "myVariable" somewhere?

  14. #13
    Join Date
    Apr 2007
    Location
    Sunny Darwin, NT Australia
    Posts
    186
    Thanks
    29
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: KDevelop debugger setup problem

    Yes, when debug is started, a "Variables" tab is added to the left of the IDE. I manually added it in that window and also by hilighting the variable in the source code window and add it from the popup menu. Both methods give the same result.

    Although I deleted the watch entries, closed the project and re-built it, the same error dialog still pops up every time the variable is accessed in a debug session.

    While the app is running, the Breakpoint icon in the source window is red.

    Another odd thing, in the IDE Debug pulldown menu, the available options are:
    Stop
    Interrupt
    Set Execution position to cursor
    Restart

    But these menu options are disabled:
    Run to cursor
    Step Over
    Step over instruction
    Step Into
    Step Into Instruction
    Step out

    For what it's worth, the Shell window that opens doesn't seem to do anything. It's just a blank shell with no prompt, nothing gets sent to it.

    Just now as I closed the running app, KDevelop debug dialog reported numerous error messages, all the same:
    No registers

    Then the debugger encountered an internal error reported by gdb, "Please submit a bug report".
    Last edited by vieraci; 12th September 2007 at 14:08.

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

    honest581 (17th September 2007)

  16. #14
    Join Date
    Sep 2007
    Posts
    5
    Thanks
    1
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: KDevelop debugger setup problem

    ok,i also met the same proplems ,i donot know how to resolve them .anyone know where is some documents about using debugger in kdevelop ?my email honest581@yahoo.com.cn,
    expect somebody give me some advice!
    i have search forums in China,but there no answer,i think here i would like get something!

Similar Threads

  1. Basic Qt4 tutorial needed
    By pthomas in forum Qt Programming
    Replies: 26
    Last Post: 16th October 2006, 16:11
  2. Problem with Debug mode in KDevelop
    By zlatko in forum KDE Forum
    Replies: 1
    Last Post: 16th June 2006, 10:10
  3. problem about multiple project in Kdevelop
    By coralbird in forum KDE Forum
    Replies: 6
    Last Post: 9th March 2006, 02:48

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.