Is it possible to add debug symbols to an existing C++ .so (shared library)?

  .so, c++, g++, gdb, makefile

I have a work project that relies on a very large, inherited C++ shared library that was released without debug symbols and we only have the .h includes. Often, there is a need to see how those functions act on values passed in but debugging in gdb skips over those functions. Is it possible for me to build the sources myself to ensure the debug symbols are there? I have tried adding the -g flag to the CXXFLAGS section in my Makefile but that didn’t seem to do it. Any help or insight would be greatly appreciated.

Source: Windows Questions C++

LEAVE A COMMENT