Question

I would like to get information from a Mac OS X crashlog. I followed the instructions in Apple TN2123, in section Symbols and CrashReporter.

I managed to get the line number of a crash when the symbols are not stripped.

Unfortunately, once I have stripped symbols, no matter the value of the STRIP_STYLE flag, the product I am not able to get the exact line number. From what I read in the TN, it seems to be possible.

Does anyone know how to do that?

EDIT

After some more investigation, it seems that it is because I use a static library. If I got a crash in a file that is compiled in the application target I can get the line number.

However if the crash is occuring in a file that is from the static library I always get the "No line number information available for address" message.

If I am not wrong, the static library is not position-independent code so the slide is 0 (right?).

Should I use some particular flags in the static library target?



Thanks in advance

Kevin

Was it helpful?

Solution

I posted the question on Xcode mailing list and someone from Apple gave me some useful information.

Here is his answer, the interesting part is there:

The other thing to note is that among the things the "strip" tool removes from a binary is the debug map. So you have to be careful in your build process that you don't strip any of the build products until AFTER you make the dSYM. If you don't get that right then you will have some parts of your executable that will not have any debug info.

I tried to not strip the static library and it does the trick.

Kevin

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top