Results 1 to 5 of 5

Thread: Remote debugging with Qt Creator

  1. #1
    Join Date
    Sep 2009
    Posts
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Remote debugging with Qt Creator

    Hi,

    Has anybody been able to do remote debugging with Qt Creator ?

    I'm using Qt Creator 1.2.1 on Ubuntu 9.04 and I'm trying to debug a program built for QtEmbedded-4.5.1 on a x86 based target running a custom embedded linux, but I'm not getting it to work.

    I was able to remotely debug the same application with GDB alone and also with Eclipse, but not with Qt Creator!

    Here's what I've done:

    1) In the "Tools -> Options..." dialog, I selected the "Debugger / Gdb" panel and configured the "Gdb location" field to point to the GDB suitable for handling my target (i386-linux-uclibc-gdb)

    2) In this same panel, leaving the "Gdb start up script" field blank, Qt Creator can't even connect to the gdbserver on the target. So I had to provide a link to the following gdb start-up script:

    file ./HelloWorld
    target remote 192.168.0.180:1000


    3) I started the gdbserver on the target by entering "gdbserver 192.168.0.180:1000 ./HelloWorld -qws" on the target's terminal

    4) Then I requested Qt Creator to start debugging with the "Debug -> Start Debugging -> Start and Attach to Remote Application..." menu command. The application run on the target but it didn't stop on the breakpoint set in the first instruction of main(). Qt Creator shows me a "Debugger exited" message in the grey status bar and the "Application Output" panel shows the following error message:

    Unable to find dynamic linker breakpoint function.
    GDB will be unable to debug shared library initializers
    and track explicitly loaded dynamic code.Selected architecture i386:x86-64:intel is not compatible with reported target architecture i386
    A handler for the OS ABI "GNU/Linux" is not built into this configuration
    of GDB. Attempting to continue with the default i386:x86-64:intel settings.
    Selected architecture i386:x86-64:intel is not compatible with reported target architecture i386


    Indeed, after issuing the "Debug -> Start Debugging -> Start and Attach to Remote Application..." menu command, the "Start Debugger" dialog appears requesting input for "Host and port" and "Architecture". For the latter, the only option available is "i386:x86-64:intel".

    This seems to be the problem, but how can I change this setting ?

    Can anybody give me a hint of how to do remote debugging with Qt Creator ?

    Rodrigo Tavares
    Brazil

  2. #2
    Join Date
    May 2008
    Posts
    155
    Thanked 15 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Remote debugging with Qt Creator

    Recent git snapshot offer 'i386' and 'i386:x86-64:intel' as remote architectures.

  3. #3
    Join Date
    Sep 2009
    Posts
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Remote debugging with Qt Creator

    Hi "ktk",
    I tried the 1.2.91 snapshot last friday and it does has the i386 platform. It has allowed me to make some progress as I'm not getting the architecture error anymore. Nevertheless, I still cannot debug the application.

    After selecting "Debug -> Start Debugging -> Start and Attach to Remote Application...", QtCreator seems to successfully connect to the target, but shows me the following error dialog and aborts the debugging session:

    Connecting to remote server failed:
    164^error,data={msg="Don't know how to attach. Try \"help target\".",logstreamoutput="attach\nDon't know how to attach. Try \"help target\".\n",consolestreamoutput="A program is being debugged already. Kill it? (y or n) [answered Y; input not from terminal]\n"}

    The console showed the following debug printfs:

    ASSERTION state() == InferiorRunningRequested FAILED AT ../../../../src/plugins/debugger/gdb/remotegdbadapter.cpp:251
    InferiorStarting ( 9 )
    ASSERTION false FAILED AT ../../../../src/plugins/debugger/gdb/remotegdbadapter.cpp:279
    InferiorStarting ( 9 )
    UNEXPECTED STATE TRANSITION: "State changed from InferiorStarting(9) to AdapterShuttingDown(19)."

    My question is: for debugging a remote application with QtCreator, is it necessary to provide a gdb start-up script ? Shouldn't QtCreator be able to automatically talk to gdbserver on the target and start the debugging ?

    Does anybody
    Regards,

    Rodrigo

  4. #4
    Join Date
    Sep 2009
    Posts
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Smile Re: Remote debugging with Qt Creator

    It was a bug in Qt Creator. It's been fixed already.

    For more information, see this thread:

    http://lists.trolltech.com/pipermail...er/004633.html

    Rodrigo.

  5. #5

    Default Re: Remote debugging with Qt Creator

    What about

    A handler for the OS ABI "GNU/Linux" is not built into this configuration
    of GDB. Attempting to continue with the default i386:x86-64:intel settings.
    Selected architecture i386:x86-64:intel is not compatible with reported target architecture i386

    that happens to me as well and it results in crashes when I try tu debug...

    `/lib/ld-linux.so.2': Shared library architecture unknown is not compatible with target architecture arm.
    `/lib/ld-linux.so.2': Shared library architecture unknown is not compatible with target architecture arm.
    `/lib/librt.so.1': Shared library architecture unknown is not compatible with target architecture arm.
    .dynamic section for "/lib/librt.so.1" is not at the expected address (wrong library or version mismatch?)
    `/lib/libdl.so.2': Shared library architecture unknown is not compatible with target architecture arm.
    .dynamic section for "/lib/libdl.so.2" is not at the expected address (wrong library or version mismatch?)
    `/lib/libpthread.so.0': Shared library architecture unknown is not compatible with target architecture arm.
    .dynamic section for "/lib/libpthread.so.0" is not at the expected address (wrong library or version mismatch?)
    `/lib/libm.so.6': Shared library architecture unknown is not compatible with target architecture arm.
    .dynamic section for "/lib/libm.so.6" is not at the expected address (wrong library or version mismatch?)
    `/lib/libgcc_s.so.1': Shared library architecture unknown is not compatible with target architecture arm.
    .dynamic section for "/lib/libgcc_s.so.1" is not at the expected address (wrong library or version mismatch?)
    `/lib/libc.so.6': Shared library architecture unknown is not compatible with target architecture arm.
    .dynamic section for "/lib/libc.so.6" is not at the expected address (wrong library or version mismatch?)
    `/lib/ld-linux.so.2': Shared library architecture unknown is not compatible with target architecture arm.
    `/lib/ld-linux.so.2': Shared library architecture unknown is not compatible with target architecture arm.
    `/lib/librt.so.1': Shared library architecture unknown is not compatible with target architecture arm.
    .dynamic section for "/lib/librt.so.1" is not at the expected address (wrong library or version mismatch?)
    `/lib/libdl.so.2': Shared library architecture unknown is not compatible with target architecture arm.
    .dynamic section for "/lib/libdl.so.2" is not at the expected address (wrong library or version mismatch?)
    `/lib/libpthread.so.0': Shared library architecture unknown is not compatible with target architecture arm.
    .dynamic section for "/lib/libpthread.so.0" is not at the expected address (wrong library or version mismatch?)
    `/lib/libm.so.6': Shared library architecture unknown is not compatible with target architecture arm.
    .dynamic section for "/lib/libm.so.6" is not at the expected address (wrong library or version mismatch?)
    ...........

    I have this as welll...I am using a gdb with target arm-linux...
    Best Regards

Similar Threads

  1. debugging in QT Creator
    By talk2amulya in forum Qt Tools
    Replies: 3
    Last Post: 22nd February 2009, 07:50
  2. Program crashes with assert error in xcb_lock.c
    By Valheru in forum Qt Programming
    Replies: 3
    Last Post: 18th November 2007, 20:56
  3. KDE 3.5.0 crash while opening project
    By MarkoSan in forum KDE Forum
    Replies: 2
    Last Post: 19th October 2007, 17:21
  4. Kdevelop remote debugging
    By hgedek in forum KDE Forum
    Replies: 0
    Last Post: 17th October 2007, 11:16
  5. Replies: 0
    Last Post: 21st September 2007, 12:08

Tags for this Thread

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.