There are many questions related to specific errors why stepping into a shared library with gdb isn\'t working. None of them provide a systematic answer on how to confirm wh
Some more tests you can do on built shared library:
file libmyshared-ggdb.so should report that library has debug info and not stripped.nm libmyshared-ggdb.so | grep print_from_lib should find the symbol for print_from_lib function.If all above tests passed try to load the library directly in gdb and find the function:
gdb libmyshared-ggdb.so
(gdb) info functions print_from_lib
Function print_from_lib name should be printed. If not, something is wrong with gdb or gcc.