Results 1 to 5 of 5

Thread: Debugging with gdb

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2007
    Posts
    28
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    7

    Default Re: Debugging with gdb

    Thanks!
    Yes, this works but again i don't have the symbols.

    If i type 'file executable' the gdb kills the current session and loads the symbols (but when i will be in remote environment??) but the gdbserver exits
    If i re-run the server gdb shows me the source correctly.
    Is there a way to avoid all this operations on them and launch a complete debugging session?

    If i should be in a real remote debugging session, the gdb have to see the executable loaded on the target? So, both of them have to see the executable?

    Thanks a lot!
    SteM

  2. #2
    Join Date
    Jun 2007
    Posts
    28
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    7

    Default Re: Debugging with gdb

    I'm trying to debug using Eclipse environment.
    This seems to be good, the environment switch to Debug prespective, i can view the source code but when run the line:
    QApplication app(argc, argv);
    the application exits with the messages in the console view:

    Qt Code:
    1. seashell: cannot connect to X server
    2.  
    3. Child exited with retcode = 1
    4.  
    5. Child exited with status 1
    6. GDBserver exiting
    7. logout
    To copy to clipboard, switch view to plain text mode 


    How can i debug a graphical QT aplication with gdb/gdbserver?
    Do i need some extra settings?

    Thanks again !!
    SteM

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: Debugging with gdb

    Quote Originally Posted by SteM View Post
    Yes, this works but again i don't have the symbols.

    If i type 'file executable' the gdb kills the current session and loads the symbols (but when i will be in remote environment??) but the gdbserver exits
    Did you pass the path to the executable as a parameter when you started gdb? Like this:
    gdb ./seadragonshellapp
    (gdb) target remote :2345
    (gdb) cont
    You can also try:
    gdb
    (gdb) file ./seadragonshellapp
    (gdb) target remote :2345
    (gdb) cont

    Quote Originally Posted by SteM View Post
    seashell: cannot connect to X server
    I've never tried to debug a C++ application in Eclipse, but maybe it's a matter of invoking xhost with proper parameter? Maybe there's something in the logs?

  4. The following user says thank you to jacek for this useful post:

    SteM (23rd August 2007)

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
  4. Debugging on Mac
    By rickbsgu in forum Qt Programming
    Replies: 3
    Last Post: 13th October 2006, 13:12
  5. problem with gdb debugging
    By bruce1007 in forum General Discussion
    Replies: 1
    Last Post: 3rd August 2006, 13:37

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
  •  
Qt is a trademark of The Qt Company.