Debugging on gentoo with QtCreator

Leo Franchi lfranchi at kde.org
Thu Aug 19 19:41:07 CEST 2010


On Thu, Aug 19, 2010 at 12:41 PM, Marius <rara at quantentunnel.de> wrote:
> on Thursday 19 August 2010 18:23 Leo Franchi <lfranchi at kde.org> wrote:
>> lfranchi: lolOn Thu, Aug 19, 2010 at 11:57 AM, Marius
>>
>> <rara at quantentunnel.de> wrote:
>> > Hi folks,
>> >
>> > I'm trying to debug amarok on gentoo with QtCreator 1.3. In general it
>> > works, i.e. I can set breakpoints etc. I have problems though when
>> > amarok crashes inside a Qt function. gdb then shows the function name,
>> > but can't find the source code, so I only get the disassambled code,
>> > which is of no use. Additionally, the asserts in Qt are disabled by
>> > default on gentoo. Is it possible to use a local Qt installation with
>> > asserts enabled, to get useful backtraces in QtCreator?
>> >
>> > Additionally, gdb is sometimes incredibly slow when debugging amarok. In
>> > numbers: it often needs more than half a minute with 100% cpu to do one
>> > debugging step. Sometimes gdb even crashes. Do you have similar problems?
>>
>> I've not had much trouble debugging amarok with gdb. However, my setup
>> is with a hand-compiled qt/kde with debug symbols and i use "cgdb" as
>> my debugging frontend (curses debugger, basically gdb command line +
>> split view of current source code location). it's super fast and with
>> qtcreator's debugging helpers, i can print out native qt data types :)
>
> Does that mean you have to run your whole kde installation in debug mode, or
> can you run an application which is linked to different kdelibs etc. inside the
> running "system kde"? It would be great if you could provide some info about
> your setup, or point me to a link where I can read more.
>
> Is there a possibility to integrate a usable debugger into a graphical ide?
> What about the kdevelop guys, do you have better success with gdb?

I mostly have something based on this:

http://techbase.kde.org/Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/Environment_Scripts

My whole qt/kde is in debug-mode, which I realize is not an optimal
setup for most users. It is all installed in ~/kde/. However as a
KDE/Qt developer I have different needs, so I much prefer having great
backtraces everywhere :)

For debugging I used to use QtCreator but have switched to cgdb for
speed and simplicity. It always works, and after learning a few gdb
commands I can do anything I need to.
-- 
_____________________________________________________________________
leo at kdab.com                                 KDAB (USA), LLC
lfranchi at kde.org                             The KDE Project


More information about the Amarok-devel mailing list