0

A static library (MacOS .a package) is made out of several object files (compiled source code .o files). From the Xcode output I can verify that .o files were built using debug symbols (-g flag used), moreover, running dwarfdump file.o prints out debug information. When all the object files are gathered together in a .a package dwardump libname.a returns nothing. Does this mean that debug symbols were stripped out on packaging stage? (which is achieved by invoking libtool with the flags: -static -arch_only x86_64)

If this is the case, how can I re-enable debug symbols in .a package?

peetonn
  • 2,942
  • 4
  • 32
  • 49
  • 2
    They're probably still there; extract an object file from your library using `ar x` and check again. – Carl Norum Sep 09 '13 at 18:40
  • yeap, they are. why can't I see them using dwarfdump or are there any special tools for libraries? – peetonn Sep 09 '13 at 22:48
  • Because `dwarfdump` works on object files and a library archive is not an object file. If you want to work on the objects inside an archive, extract them. – Carl Norum Sep 09 '13 at 23:07

0 Answers0