libbacktrace
libbacktrace copied to clipboard
dSYM files are not found for applications/packages
I am successfully using libbacktrace for simple mach-o executables but the logic to find the .dSYM file is not working for application bundles. For example, the filename for macho_add_dsym looks like:
<app_name>.app/Contents/MacOS/<app_name>
and it should be looking to find the .dSYM file here:
<app_name>.app.dSYM/Contents/Resources/DWARF/<app_name>
but instead looks here:
<app_name>.app/Contents/MacOS/<app_name>.dSYM/Contents/Resources/DWARF/<app_name>
I did a quick test to generate the path as suggested above and that resolves the issue.
It's not clear to me why the current code isn't working. In libbacktrace/macho.c in macho_add_dsym I see that it strips everything after the last slash when assembling the dsym name. Can you post the patch that you are using the get the correct dsym path? Thanks.