Skip to content

Conversation

@fosterbrereton
Copy link
Contributor

As noted in one of the PR's comments, this PR makes a lot of assumptions about the various files, nuances, metadata, directory structures, etc., that are contained within a dSYM directory. I would expect further tweaks will be necessary as real-world issues are found. Until then, this appears to do things.

To make a dSYM from a binary, use dsymutil (docs):

cd /path/to/binary
dsymutil binary

This will create binary.dSYM next to the binary. Note: when passing a dSYM folder to orc, you must omit the / at the end of the path, or orc will pass it over:

./orc /path/to/binary.dSYM # ok
./orc /path/to/binary.dSYM/ # error

You can also create a "flat" symbol file which ORC also supports with this PR:

cd /path/to/binary
dsymutil binary --flat

This will create binary.dwarf next to the binary.

In either case, dsymutil does not modify the binary (you'd use strip for that).

This PR also adds a couple tests to ensure ORC scans the two file formats above successfully. It does this by making dSYMs from its own debug binary, and scans them.

@fosterbrereton fosterbrereton enabled auto-merge (squash) May 17, 2024 02:53
@fosterbrereton fosterbrereton disabled auto-merge May 17, 2024 02:53
Copy link
Contributor

@leethomason leethomason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good start

@fosterbrereton fosterbrereton enabled auto-merge (squash) May 20, 2024 20:38
@fosterbrereton fosterbrereton merged commit 18583dc into main May 20, 2024
@fosterbrereton fosterbrereton deleted the fosterbrereton/dsym-support branch May 20, 2024 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants