[Qt-creator] How to debug Qt Libraries
Rudenko Eugene
erule.biz at gmail.com
Sun May 31 20:02:21 CEST 2009
31.05.2009, в 14:41, Andre Poenitz написал(а):
> On Sun, May 31, 2009 at 02:06:03AM +0400, Rudenko Eugene wrote:
>> Yes, I I compiled it by myself (there is no another way for qt-
>> embedded :-) ), yes make install striped libraries,
>> and I used the way you show (configure Qt with -prefix=$PWD without
>> installing it). And result is same, not step in in library source
>> code.
>
> Did you ./configure with -debug?
Of course !!! I can see debug symbols via mc-commander and nm directly.
>
>> I can't understand how to show to debugger where is cpp files
>> located.
>> In Debug->Sources view I can see headers from $QT_DIR/include path.
>> But how to show to debugger where sources to get and how to know that
>> debugger didn't find sources or it's another error ?
>
> As you didn't move the compiled Qt it really should find them
> out-of-the box.
there are the steps I did while compiled qt-embedded:
1. I created some script to configure wt-embedded:
#!/bin/bash
PREFIX=$PWD
PARAMS="-prefix $PREFIX \
-no-fast \
-no-largefile \
-no-exceptions \
-no-accessibility \
-stl \
-no-sql-db2 \
-no-sql-ibase \
-no-sql-mysql \
-no-sql-oci \
-no-sql-odbc \
-no-sql-psql \
-no-sql-sqlite \
-no-sql-sqlite2 \
-no-sql-tds \
-no-qt3support \
-no-xmlpatterns \
-no-phonon \
-no-phonon-backend \
-no-svg \
-no-webkit \
-no-scripttools \
-no-mmx \
-no-3dnow \
-no-sse \
-no-sse2 \
-qt-zlib \
-qt-gif \
-qt-libtiff \
-qt-libpng \
-qt-libmng \
-qt-libjpeg \
-nomake examples \
-nomake demos \
-nomake docs \
-nomake translations \
-no-optimized-qmake \
-no-nis \
-no-cups \
-no-iconv \
-no-pch \
-no-dbus \
-no-separate-debug-info \
-no-freetype \
-qconfig sm2 \
-depths 32 \
-no-opengl \
-qt-gfx-qvfb \
-qt-kbd-qvfb \
-openssl-linked \
-qt-mouse-qvfb "
./configure -shared -debug \
$PARAMS \
-I/usr/include/openssl \
-L/usr/lib \
2. run make
That's All
>
>> For example in eclipse, during debuging, when debugger unable to find
>> sources (for application or library), it's show error string
>> "unable
>> to find sources for file xxx.cpp" in code editor view (where source
>> code for debuging must be appear).
>
> Creator currently shows the innermost frame for which debug
> information
> is available. I don't think that's the worst choice.
Yes, but it will be better to have some way to say debugger where to
get sources. (I think it's not very hard, via GDB).
>> Also it's Interesting how the guys from qtsoftware (former trolls)
>> debug this libraries? from gdb directly?
>
> Different people use different techniques. Using plain gdb is
> certainly
> one of them, others include using Qt Creator, "printf-style"
> debugging,
> or even just "reading the code".
Ok, you confirm that someone use QtCreator under Linux for debugging
qt-embedded libraries with success and it's possible to do it?
> Regards,
> Andre'
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-creator
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20090531/cc0eab0e/attachment.html
More information about the Qt-creator-old
mailing list