How tools get debugging information:
The tools receive debugging information from the .dSYM file that Xcode automatically generates when setting the debugging data format to DWARF using the dSYM file in combination with a checkmark in the "Create debugging symbols" box. Setting these parameters will add an additional step to the Xcode build process and generate the dSYM file after compiling the application. Each dSYM is built with a UUID that corresponds to the UUID in the Mach-O section in the binary format from which it is derived. The Spotlight importer indexes the UUID of each dSym file located in a location accessible by Spotlight on your Mac. Therefore, SPOTLIGHT does all the black magic and is responsible for creating the connection between the .app you are running and its corresponding .dSYM file.
How to create debug information and a dSYM file without Xcode:
Make sure you compile the -gdwarf-2 and -g flags. (Other flag combinations possible)
-g Produce debugging information in the native format of the operating system (stabs, COFF, XCOFF or DWARF 2). GDB can work with this debug info. On most systems that use stabs format, -g allows you to use additional debugging information that only GDB can use; this additional information does more efficient debugging work in GDB, but is likely to crash other debuggers or refuse to read the program. if you want to precisely control whether additional information should be generated, use -gstabs +, -gstabs, -gxcoff +, -gxcoff or -gvms (see below). GCC allows you to use -g with -O. Labels taken by optimized code may occasionally surprise the results: some variables that you specify may not exist at all; the flow of control may briefly move where you do not expect it; some statements cannot be fulfilled because they calculate constant results or their values were already at hand; some statements can be performed in different places because they have been moved out of loops.
However, this proves optimized debug output. This makes it wise to use an optimizer for programs that may have errors.
-gdwarf-2 Produce debugging information in DWARF version 2 format (if supported). This is the format used by DBX on IRIX 6. With this option, GCC uses DWARF version 3 functions when they are useful; version 3 is compatible with version 2, but it can still cause problems for older debuggers.
Create a dSYM file using dsymutil. If the tool is not recognized on the command line, use the spotlight to find it. IMPORTANT: place the .app file on your Mac HD before creating dSYM if you are working with a network drive.
dsymutil MyApp.app/MyApp -o MyApp.app.dSYM
Place the .dSYM file on the local Mac drive and launch the Tools as usual.
Resettig Spotlight Installation:
If characters are not displayed, this may be due to a spotligh error. You can try reprogramming the searchlight indexing by adding the folder containing the dSYM file (or even your drive) to “Prevent the searchlight from searching in these places” in the searchlight settings, and then delete it immediately.
Mac Twist May 20 '10 at 18:55 2010-05-20 18:55
source share