Page 1 of 1

Debugging wxWidgets Library

Posted: Mon Feb 03, 2014 9:50 pm
by iwbnwif
Hi,

I have the latest version of Codelite and wxCrafter and have just upgraded to Ubuntu 13.10. I have also added the Codelite wxWidgets repositories from here http://codelite.org/LiteEditor/WxWidgets30Binaries#toc2.

I am having some problems with wxGrid and would like to step through the grid.cpp source code, but don't seem able to. Are the Codelite wxWidgets repositories debug or release builds because it doesn't seem to say on the page?

Many thanks!

Re: Debugging wxWidgets Library

Posted: Mon Feb 03, 2014 10:29 pm
by eranif
I am not really sure, I think its debug with optimizations enabled.
You can check it by running:

Code: Select all

file /path/to/wxwidgets/ilb.so
and see that the binary is not stripped

Eran

Re: Debugging wxWidgets Library

Posted: Mon Feb 03, 2014 11:08 pm
by iwbnwif
Eran,

Thanks for the super fast reply, I did as you said and the result is:

Code: Select all

libwx_gtk2u_unofficial_core-3.0.so.0.0.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=0xc683e0029061ba9cb087fb73266bfe9d2954a563, stripped
So time to do my own build I guess!

Re: Debugging wxWidgets Library

Posted: Mon Feb 03, 2014 11:24 pm
by DavidGH
Hi,

The debug symbols come in separate libraries, libwxbase-3.0-dbg and libwxgtk-3.0-dbg. You can install them in the normal way with apt.

Regards,

David

Re: Debugging wxWidgets Library

Posted: Tue Feb 04, 2014 12:10 am
by iwbnwif
David,

That's perfect thank you very much!

Re: Debugging wxWidgets Library

Posted: Tue Feb 04, 2014 11:34 pm
by iwbnwif
Sorry, do I need to do anything special to link against the debug libraries?

I see they have been put in /usr/lib/debug/usr/lib/i386-linux-gnu/ but the symbolic links followed by wx-config are still pointing to the release libraries.

Also I have downloaded the sources but they have been installed in my home directory. I have put the path in the project settings for Common Settings->Debugger but for some reason the sources seem to be out-of-sync (i.e. stepping through does not appear to follow the source code lines).

Re: Debugging wxWidgets Library

Posted: Wed Feb 05, 2014 2:35 am
by DavidGH
The idea is that you link to the original libs. The debug libs just contain debugging symbols; they contain what, when the original libs were stripped, was stripped out of them.

Once they're installed, debugging just 'just work'. If it doesn't, probably your best bet is to build your own wx and use that.

Re: Debugging wxWidgets Library

Posted: Wed Feb 05, 2014 9:12 pm
by iwbnwif
Thanks, in the end I did what you suggested and built my own debugging library. It took a while because for I didn't realise that BUILD=debug doesn't work on Linux so I had to use configure --enable-debug :oops: .