Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dSYM Directories While Compiling C++ Code in MacOS

Why compiling C++ in Mac always create *.dSYM directories? Is there a way to disable that?

like image 982
neversaint Avatar asked Feb 25 '09 05:02

neversaint


People also ask

What is dSYM file Mac?

A dSYM file is an ELF file that contains DWARF (debugging with attributed record formats) debug information for your application. DWARF is a debugging file format that supports source-level debugging.

Where is the dSYM file located?

dSYM file automatically for you when you use the Archive option. The created archive contains your app and its dSYM and is stored in ~/Library/Developer/xcode/Archives .


1 Answers

It's because your Xcode project is set up to build debug symbols with an external dSYM file. This is actually very handy for release builds, as it means that you can strip debug symbols from your app, and when a user sends a crashdump to you, you can use the original dSYM file to generate a proper stacktrace for debugging.

Anyways, you don't need to disable debug symbol generation in your project. Instead, just change the debug symbol type to DWARF (instead of "DWARF with dSYM File"). You can also use Stabs, but that's the old format.

Edit: Ah, I see you meant from the command line, not from Xcode. I'm not sitting in front of my mac atm, but I see from the gcc4 manpage than you can specify -gstabs to use the Stabs format.

like image 59
Nik Reiman Avatar answered Oct 04 '22 15:10

Nik Reiman