How to debug shared library ?

General questions regarding the usage of CodeLite
fausten
CodeLite Curious
Posts: 4
Joined: Fri Jan 17, 2014 5:45 am
Genuine User: Yes
IDE Question: c++
Contact:

How to debug shared library ?

Post 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.
fausten
CodeLite Curious
Posts: 4
Joined: Fri Jan 17, 2014 5:45 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: How to debug shared library ?

Post 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 ?
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: How to debug shared library ?

Post 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
Make sure you have read the HOW TO POST thread
fausten
CodeLite Curious
Posts: 4
Joined: Fri Jan 17, 2014 5:45 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: How to debug shared library ?

Post 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
fausten
CodeLite Curious
Posts: 4
Joined: Fri Jan 17, 2014 5:45 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: How to debug shared library ?

Post 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.
Post Reply