Thanks for your answer Christian !

Christian Kandeler wrote:
Hi,

  
I'm currently trying to debug remotely an application through gdb using
Qt Creator. Majo had the same issue previously
(http://www.mail-archive.com/qt-creator@trolltech.com/msg02532.html) but
I don't know what was its final results.

----------------------------------------------------------

State of the art :

I've gdbserver on my device and gdb on my host.
Gdb is configured into Qt Creator (Tools>Options>Debug>Gdb) without gdb
startup script.
My application is built using the right compiler (out of Qt Creator)
My application is on the device.

----------------------------------------------------------

Procedure :

I launch my application using gdbserver on the device : gdbserver
host:port ./application
I start debugging using gdb in Qt Creator : Debug>Start Debugging>Start
and attach to remote application (using i386 option)

----------------------------------------------------------
    

The architecture should match your target, i.e. arm. (Shouldn't matter though, 
since your cross-debugger doesn't not support i386 anyway.)
Also, have you set the sysroot?
And which version of Creator are you using?

  
I'm using Qt Creator 1.3.1.
About the sysroot, I don't know what I have to put in it (which path). It's probably my main problem though ! GDB is looking for libQtGui.so.4 in /usr/lib and the file is there (see below). I don't understand why he doesn't find it...

>&"warning: .dynamic section for \"/usr/lib/libQtGui.so.4\" is not at the expected address (wrong library or version mismatch?)\n"

  
Log on the device console :
    

[ ... ]

  
 >&"/lib/ld-linux.so.3: No such file or directory.\n"
    

This looks to be the main problem. Again: Have you set the correct sysroot?

  
Questions :

1 - Gdbserver is logging an error : "gdbserver: error initializing
thread_db library: version mismatch between libthread_db and libpthread"
and I have not this error when I'm debugging remotely without Qt
Creator. I guess it is due to commands sent by Qt creator to gdb. How
can we configure the commands sent by Qt Creator to gdb/gdbserver ?
    

Which commands do you send to gdb when manually debugging?
  
Nothing for now but Qt Creator sends a lot of commands and I don't know why and how to configure them.

  
2 - What is the purpose of gdb startup file and gdbserver startup file ?
What is the syntax ?
    

It's an sh script intended for doing preparations on the server side, like 
copying your program or starting gdbserver. See the email you referenced above 
for an example.

  
Ok, I will try it when other points will be ok. Even with a embedded linux on my target, I will be able to copy and lanch gdbserver automatically ?

  
 If you are not the intended addressee of this
 message, please cancel it immediately and inform the sender.
    

How do I know if I'm the intended addressee? Anyway, you are hereby informed 
that I received this message.
  
Sorry for this message, it's automatically generated...

Christian

  
*********************************
This message and any attachments (the "message") are confidential and intended solely for the addressees. 
Any unauthorised use or dissemination is prohibited.
Messages are susceptible to alteration. 
France Telecom Group shall not be liable for the message if altered, changed or falsified.
If you are not the intended addressee of this message, please cancel it immediately and inform the sender.
********************************
_______________________________________________
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator

Reply via email to