This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: break points for shared libs


On Sat, Dec 09, 2006 at 11:26:11AM +0530, Anitha Boyapati wrote:
> Actually my requirement is to make breakpoints work in a shared library
> while debugging another application which uses the above shared library.
> 
> The child.cc is the source file for libmem.so
>  (g++ -g -shared -o libmem.so child.cc)
> 
> Please let me know how can i do this.

You should not have to do anything.  Don't mention the shared library
explicitly to GDB - it doesn't need that.  Just load the real
application that you want to debug and run it.  You should be able to
set a breakpoint in the shared library.

If you are using an old version of GDB, upgrade to the latest release.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]