[Interest] debug symbols in OSX application builds

Hamish Moffatt hamish at risingsoftware.com
Mon Aug 1 04:36:32 CEST 2016


When I get crash dumps from customers on OSX, I have no symbol names for 
functions in my own code, but I do get names in the Qt libraries.

For example,


Thread 0 Crashed:: Dispatch queue: com.apple.main-thread

0   com.risingsoftware.auralia5       0x0000000102807815 0x10229f000 + 5670933

1   com.risingsoftware.auralia5       0x00000001027ea8e2 0x10229f000 + 5552354

2   com.risingsoftware.auralia5       0x00000001022b9a2c 0x10229f000 + 109100

3   com.risingsoftware.auralia5       0x00000001022a8d14 0x10229f000 + 40212

4   com.risingsoftware.auralia5       0x00000001025cc2b9 0x10229f000 + 3330745

5   com.risingsoftware.auralia5       0x00000001025cce4f 0x10229f000 + 3333711

6   org.qt-project.QtCore             0x0000000104b20209 QMetaObject::activate(QObject*, int, int, void**) + 2777


I have tracked this down to macdeployqt, which is running strip on my 
binary. However it is also running strip on the Qt frameworks, yet its 
symbol names survive?

If I add -no-strip to macdeployqt, I get symbol names plus filenames as 
well:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread

0   com.risingsoftware.myapp       0x0000000103a72815 myClass::myMethod() + 261 (my_filename.cpp:100)

1   com.risingsoftware.myapp       0x0000000103a558e2 myOtherClass::setOpen(bool) + 242 (type_traits:3598)



This is good but it's adding to my executable size significantly. Is 
there some way to get just the method names, as the Qt frameworks 
provide? I am happy to run strip myself after macdeployqt.

At compile time I have:
     QMAKE_CFLAGS += -gdwarf-2 -g
     QMAKE_CXXFLAGS += -gdwarf-2 -g
     QMAKE_LFLAGS += -gdwarf-2 -g


Hamish



More information about the Interest mailing list