After I attach gdb, it immediately starts a prolonged symbol loading process. It’s better to skip the loading, and selectively load some symbols.
https://ascending.wordpress.com/2007/09/02/a-couple-of-gdb-tricks/ describes how to use ~/.gdbinit, but I had no permission to write to the ~/
gdb -iex ‘set auto-solib-add off’ …. # worked
–loading a particular *.so file
I got “No loaded shared libraries match the pattern” and fixed it by
shar file.name.so #instead of /full/path/to/file.name.so.some.version