Alex Rivera | Logout

How can I tell if a library was compiled with -g?

Asked 2010-01-04T13:52:16.960
132

I have some compiled libraries on x86 Linux and I want to quickly determine whether they were compiled with debugging symbols.

Edit
Report

1 Answer

38

nm -a <lib> will print all symbols from library, including debug ones.

So you can compare the outputs of nm <lib> and nm -a <lib> - if they differ, your lib contains some debug symbols.

answered 2010-01-04T13:56:24.220

Your Answer