You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because swift uses local symbols in ELF executables extensively and `dladdr` cannot find them (that's the documented behaviour of `dladdr` on Linux). AFAIK there is no simple alternative to `dladdr` and implementing ELF parsing code in stdlib isn't a good idea.
Instead, I'm proposing writing a python script that is able to re-symbolicated stack trace afterwards. The input to it would be the executable + a log that contains a stack trace. It'll use lldb python bindings to construct debugging target identical in memory layout to what run at the time of the crash. Then it'll interrogate all the stack trace addresses for appropriate symbol information.
One complication is that due to Linux's ASLR, we need extra information about where the libraries were mapped at the time of the crash. This can be achieved by minor stdlib patch to print offset of framePC from the base of the shared lib that contains the address.