How do I remove symbols completely from the system?

Once I symbolicated a trace in Instruments with a dsym file it magically woks forever. Even when I delete the dlsym file new traces are symbolicated. How can I avoid that? Where is the data cached?

Any help is appreciated!

Thanks,
Eric
Answered by Developer Tools Engineer in 618654022
Hi Eric,

Symbols are being cached by the coresymbolicationd system-wide daemon that shares symbols resolving between all processes interested in them. You can operate on this cache (including removal of entries) by using symbolscache command that is available in /usr/bin. You can get more details on how to use it by just invoking it — you'll get a help description.
Please note that because of removal from the cache, subsequent recordings will take more time, as Instruments will need to resolve the symbol again, instead of hitting the cache.
Also: Remember that lookups will only be valid if the UUID is the same. In case you rebuild a binary, it'll get a different UUID and it'll again require a dsym file to resolve the the symbols.

Out of curiosity: Why would you like to do it? I'm wondering if maybe there's something else that imposes a problem for you.

Also, in case you care about symbols existing in the already saved trace files, you should be able to just remove corresponding .symbols file for the given binary UUID. It's stored in the .trace/symbols directory. Please note that this format is new in Instruments 12 Beta, so you'll not see this structure in the .trace files saved by the previous versions.

Hope it helps,

Kacper
Accepted Answer
Hi Eric,

Symbols are being cached by the coresymbolicationd system-wide daemon that shares symbols resolving between all processes interested in them. You can operate on this cache (including removal of entries) by using symbolscache command that is available in /usr/bin. You can get more details on how to use it by just invoking it — you'll get a help description.
Please note that because of removal from the cache, subsequent recordings will take more time, as Instruments will need to resolve the symbol again, instead of hitting the cache.
Also: Remember that lookups will only be valid if the UUID is the same. In case you rebuild a binary, it'll get a different UUID and it'll again require a dsym file to resolve the the symbols.

Out of curiosity: Why would you like to do it? I'm wondering if maybe there's something else that imposes a problem for you.

Also, in case you care about symbols existing in the already saved trace files, you should be able to just remove corresponding .symbols file for the given binary UUID. It's stored in the .trace/symbols directory. Please note that this format is new in Instruments 12 Beta, so you'll not see this structure in the .trace files saved by the previous versions.

Hope it helps,

Kacper
Hi Kacper,
amazing, thank’s for all the information and explanation! You helped me a lot :-)

Out of curiosity: Why would you like to do it? I'm wondering if maybe there's something else that imposes a problem for you.

We do not release our applications with symbols and want to keep them private. I have two workflow examples:
  1. I’am troubleshooting on a customer system and would like to view the traces directly on this machine without always transferring the trace to another machine to symbolicate them

  2. I’am doing some traces on my machine and would like to share them with external engineers, but only with symbols for a specific bundle, not the whole application. I don’t know how to save a symbolicated trace in Instruments without symbols once it’s symbolicated

I hope that explains the workflow?! Let me know if you have further questions :-)

Have a nice day!
Also, in case you care about symbols existing in the already saved trace files, you should be able to just remove corresponding .symbols file for the given binary UUID. It's stored in the .trace/symbols directory. Please note that this format is new in Instruments 12 Beta, so you'll not see this structure in the .trace files saved by the previous versions.
That's brilliant! Thanks!
You're welcome! If there's anything more you need regarding symbolication workflows for .trace files , please file a feedback request with us and we'll take a look :)

Out of curiosity: Why would you like to do it? I'm wondering if maybe there's something else that imposes a problem for you.

I build dev tooling for iOS applications in the CI pipeline. The apps we test do not always have symbol information available, so we build the tools to symbolicate the crash reports. To test our tooling we need to be able to generate crash reports without symbols.

The process we use:

Create a crash report without symbol information

First, make sure to build the binary without symbol information by setting DEPLOYMENT_POSTPROCESSING=Yes in the Xcode build settings.

Apple developer tooling is very eager to help you symbolicate crash reports. So helpful that it can be unclear how to create crash reports without symbol information. There are several options:

Build without generating a dSYM file.

Note that this only works when you did't build the same app (with the same binary uuid's) on that machine before.

Build on another machine, download the .app but not the .dSYM

Note that this only works if you didn't build the app, or downloaded the .dSYM before

Clear the symbolscache

  • Build the app
  • Trash the .dSYM file (you can rename or zip it if you want to use it later)
  • Run: dwarfdump -u build/DevToolTester.app/DevToolTester | cut -d' ' -f2 | awk '{print "delete "$0}' | xargs symbolscache

This last step fetches the app uuid's using dwarfdump -u build/DevToolTester.app/DevToolTester

then takes the uuid's from the output, then runs symbolscache delete <uuid1> delete <uuid2>

Now you should have

  • An app binary without symbols
  • No .dSYM for that app on your system
  • No symbols for that app in the symbolscache

Run and crash the app, the crash report will not have the symbols of the app associated.

How do I remove symbols completely from the system?
 
 
Q