Page 1 of 1

How to debug shared library ?

Posted: Fri Jan 17, 2014 6:46 am
by fausten
I am working at Mac OSX 10.9.1. When I set breakpoint in a shared library, the IDE doesn't stop at the breakpoint. I use the -g option to compile.

Re: How to debug shared library ?

Posted: Fri Jan 17, 2014 7:54 am
by fausten
I found if I use lldb in terminal window, it is ok. gdb can not stop at shared library. How to config the codelite to use lldb debugger ?

Re: How to debug shared library ?

Posted: Fri Jan 17, 2014 10:37 am
by eranif
codelite has not support for lldb (yet) - its a work in progress for thenext version.
I found it strange that you can't debug shared libraries using gdb on OSX.

Try these settings in codelite:
settings -> GDB settings

Make sure that the following is enabled:
- Enable pending breakpoints
- Apply breakpoints after main function is hit

Eran

Re: How to debug shared library ?

Posted: Sat Jan 18, 2014 7:26 am
by fausten
Hi Eran,

I have selected the two options. I once used command-line gdb to debug, can access to main function, couldn't access to shared library too, but if I use lldb command-line, it is ok to access main function and shared library both.

Fausten
eranif wrote:codelite has not support for lldb (yet) - its a work in progress for thenext version.
I found it strange that you can't debug shared libraries using gdb on OSX.

Try these settings in codelite:
settings -> GDB settings

Make sure that the following is enabled:
- Enable pending breakpoints
- Apply breakpoints after main function is hit

Eran

Re: How to debug shared library ?

Posted: Sat Jan 18, 2014 7:34 am
by fausten
I found a link here for the same problem: http://stackoverflow.com/questions/1320 ... -functions

I figure out my problem: I recompile a new gdb v7.6.2 to replace gdb provided by Apple. I couldn't find the previous version of gdb. Use the old gdb program is the solution.