I am trying to print a readable stack backtrace when handling signals (e.g. SIGV).
Currently the backtrace does not contain any references to functions in my source code:
0) /legato/systems/current/appsWriteable/CollectorApp/bin/../lib/libComponent_CollectorComponent.so(+0x34400) [0xb6eb6400]
1) /legato/systems/current/appsWriteable/CollectorApp/bin/../lib/libComponent_CollectorComponent.so(+0x344e8) [0xb6eb64e8]
2) /lib/libc.so.6(__default_sa_restorer+0) [0xb6c191e0]
3) /lib/libpthread.so.0(+0x12194) [0xb6dd4194]
4) /lib/libpthread.so.0(+0x122e8) [0xb6dd42e8]
5) /legato/systems/current/appsWriteable/CollectorApp/bin/../lib/libComponent_CollectorComponent.so(+0x2315c) [0xb6ea515c]
6) /legato/systems/current/appsWriteable/CollectorApp/bin/../lib/libComponent_CollectorComponent.so(+0x1b210) [0xb6e9d210]
7) /legato/systems/current/appsWriteable/CollectorApp/bin/../lib/libComponent_CollectorComponent.so(+0xf62c) [0xb6e9162c]
8) /legato/systems/current/appsWriteable/CollectorApp/bin/../lib/libComponent_CollectorComponent.so(+0x12d94) [0xb6e94d94]
9) /legato/systems/current/appsWriteable/CollectorApp/bin/../lib/libComponent_CollectorComponent.so(+0x12ed4) [0xb6e94ed4]
10) /legato/systems/current/appsWriteable/CollectorApp/bin/../lib/libComponent_CollectorComponent.so(+0x10968) [0xb6e92968]
11) /legato/systems/current/appsWriteable/CollectorApp/bin/../lib/libComponent_CollectorComponent.so(+0x35788) [0xb6eb7788]
12) /legato/systems/current/appsWriteable/CollectorApp/bin/../lib/libComponent_CollectorComponent.so(+0x3462c) [0xb6eb662c]
13) /legato/systems/current/appsWriteable/CollectorApp/bin/../lib/libComponent_CollectorComponent.so(_CollectorComponent_COMPONENT_INIT+0xb4) [0xb6e85a78]
Upon further inspection I found that the executable in /legato/systems/current/appsWriteable/collectorApp/bin is stripped, which would explain why I don’t get any function names.
I have tried running mkapp
with the -d option but that generates a seperate .debug file and I want this information to be included in the binary itself.