How to list symbols for .so file on macOS

Frank
Aug 10, 2022

When you debugging a dynamic link library on macOS, maybe you need to list some functions (e.g. functions). Here is a useful commands you can use:

list all symbols:

sudo symbols /path/to/the/so/file

You can use grep to filter you interested thing, for example:

sudo symbols /path/to/the/so/file | grep mysql_affected_rows

Sometimes, we may need to set the arch:

sudo symbols /path/to/the/so/file -arch x86_64 | grep mysql_affected_rows

--

--

Frank
0 Followers

A C/C++ programmer has a strong curiosity with new technology (e.g. Go, Dart, Apex).