views:

867

answers:

1

I am creating a shared library using gcc and suspect that there may be some memory leaks from the shared library. To debug, I need to enable debug symbols when creating the shared library.

To build, I am using gcc -g ... [-g is for enabling debug information] But the library [.so file] size is not changing for both -g, and without -g. Besides, I am not getting any useful information from tools like VALGRIND.

Can anyone point me the mistake?

+4  A: 

You need to use "-g" for all the steps (compiling your source files and linking).

lothar