Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top