VoidPointer VoidPointer - 2 years ago 166
Linux Question

how to know if a binary contains debugging symbols or not

I need to know whether a binary has debugging symbols in it or not. Its a production system and so doesnt have commands like


Can provide more info when needed.

OS: Debian

Answer Source

The easy solution, if you don't know if the binary has symbols or not and there are no tools on the actual machine you have the binary on, is to use something like scp (secure remote copy) to copy the file to a machine that has tools.

As the other comment says, using the strings command, which prints anything it finds that "looks like a string" (a long enough sequence of "printable" characters), but it's not quite as reliable, as you never really know what the debug symbols look like, and you can get false positives from code containing symbols from macros etc.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download