What is the dsym?

Source: Internet
Author: User

When you run the build and archive command, xcode 3.2.2 or later fetches your application binary and its associated. DsymFile and saves them in your home folder.

The. Dsym, Which contains symbol information that are useful for debugging and symbolizing crash reports, is created by setting the "debug information format" build settingDwarf with dsym FileAnd enabling the "Generate debug symbols" build setting in xcode.

Xcode app compilation, dsym

Http://www.anoshkin.net/blog/2008/09/09/iphone-crash-logs/

After compiling the project in xcode, A dsym file with the same name is displayed next to the app.
It is a compiled intermediate file, which is simply put, the debug symbols is included in this file.

What does it do? When the release version is crash, there will be a log file containing an error memory address. The symbolicatecrash tool can be used to convert the log and dsym files into readable log information, that is, to convert the memory addressProgramThe function or variable and the file name.

Similar

Thread 0 crashed:
0 libobjc. A. dylib 0 × 300c87ec 0 × 300bb000 + 55276
1 mobilelines 0x00006434 0x1000 + 21556
2 kernel elines 0 X Kernel 64c2 0x1000 + 21698
3 uikit 0 x 30a740ac 0x30a54000 + 131244

Convert the log information

Thread 0 crashed:
0 libobjc. A. dylib 0 × 300c87ec objc_msgsend + 20
1 mobilelines 0 × 00006434-[boardview setselectedpiece:] (boardview. M: 321)
2 cancelines 0 × 42564c2-[boardview touchesbegan: withevent:] (boardview. M: 349)
3 uikit 0 × 30a740ac-[uiwindow sendevent:] + 264

.

The tool symbolicatecrash is hidden in/developer/platforms/iphoneos. Platform/developer/library/xcode/plug-ins/iphoneremotedevice. xcodeplugin/contents/resources/symbolicatecrash

Therefore, it is generally copied to/usr/local/bin/and called directly as a command line.

$ Sudo CP/developer/platforms/iPhone OS. Platform/developer/library/xcode/plug-ins/iphoneremotedevice. xcodeplugin/contents/resources/symbolicatecrash/usr/local/bin/

Run at this time

$ Symbolicatecrash-H

You can see the help information.

At this time, the problem arises again... every time the compiled dsym file is manually saved, it is very troublesome.

So someone wrote a script to automatically save the file after compilation.
See:

Http://www.cimgf.com/2009/12/23/automatically-save-the-dsym-files/

I copied the script below.

#! /Bin/sh

If ["$ build_style" = "debug"]; then
Echo "skipping DEBUG"
Exit 0;
Fi

If ["$ effective_platform_name" = "-iphonesimulator"]; then
Echo "skipping simulator build"
Exit 0;
Fi

Src_path =$ {dwarf_dsym_folder_path}/$ {dwarf_dsym_file_name}
Relative_dest_path = dsym/$ {executable_name}. $ (date + % Y % m % d % H % m % s). App. dsym
Dest_path =$ {project_dir}/$ {relative_dest_path}
Echo "Moving $ {src_path} to $ {dest_path }"

Mv "$ {src_path}" $ {dest_path }"

If [-F ". Git/config"]; then
Git Add "$ {relative_dest_path }"
Git commit-m "added dsym file for $ {build_style} build" "$ {relative_dest_path }"
Fi

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.