PDA

View Full Version : gdb doubt for Qt programing



arjunasd
25th July 2007, 05:50
Hi

I want to debug my Qt code using GDB. I want to set breakpoints in the code.

When I googled i found the following command : break filename:functionName. But it does not work. So how should I use this command.

Kindly help with your suggestions.

Thanks
Arjun

jpn
25th July 2007, 11:32
Is the application compiled in debug (-g) mode?

Try:


qmake -config debug

and rebuild the app.

arjunasd
25th July 2007, 16:55
Yes. I did that but still it does not pick up the functions.

Setting breakpoints using filename:line number works but not filename:function name.

Kindly help me with suggestions if possible.

Thanks
Arjun

KaptainKarl
25th July 2007, 18:46
This may seem like a bit of overkill, but consider downloading and installing QDevelop (www.qdevelop.org). It is a nice, easy to use IDE that provides debugging through gdb right in the GUI.

Karl

markcole
25th July 2007, 19:15
This may seem like a bit of overkill, but consider downloading and installing QDevelop (www.qdevelop.org). It is a nice, easy to use IDE that provides debugging through gdb right in the GUI.

Karl

I use this daily for writing and debugging. Works great. It has a gdb commandline where you can enter gdb specific commands or just use the IDE debug buttons.