libbacktrace icon indicating copy to clipboard operation
libbacktrace copied to clipboard

dSYM files are not found for applications/packages

Open pdoane opened this issue 1 year ago • 1 comments

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.

pdoane avatar May 29 '24 21:05 pdoane

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.

ianlancetaylor avatar Jul 12 '24 01:07 ianlancetaylor