| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 # This script expects the following environment variables to be set. Xcode | 7 # This script expects the following environment variables to be set. Xcode |
| 8 # normally sets them: | 8 # normally sets them: |
| 9 # | 9 # |
| 10 # CONFIGURATION - Release or Debug; this script only operates when Release. | 10 # CONFIGURATION - Release or Debug; this script only operates when Release. |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 # its enclosing .app, .framework or .plugin bundle. This is the bundle name | 98 # its enclosing .app, .framework or .plugin bundle. This is the bundle name |
| 99 # without .app, .framework or .plugin appended. For non-bundled types, the | 99 # without .app, .framework or .plugin appended. For non-bundled types, the |
| 100 # stem is just the name of the singular file on disk. | 100 # stem is just the name of the singular file on disk. |
| 101 SRC_STEM=$(echo "${SRC_NAME}" | sed -Ee 's/\.(app|framework|plugin)$//') | 101 SRC_STEM=$(echo "${SRC_NAME}" | sed -Ee 's/\.(app|framework|plugin)$//') |
| 102 DSYM_NAME="${SRC_NAME}.dSYM" | 102 DSYM_NAME="${SRC_NAME}.dSYM" |
| 103 DSYM_PATH="${BUILT_PRODUCTS_DIR}/${DSYM_NAME}" | 103 DSYM_PATH="${BUILT_PRODUCTS_DIR}/${DSYM_NAME}" |
| 104 DWARF_PATH="${DSYM_PATH}/Contents/Resources/DWARF/${SRC_STEM}" | 104 DWARF_PATH="${DSYM_PATH}/Contents/Resources/DWARF/${SRC_STEM}" |
| 105 BPAD_SYM_NAME="${SRC_NAME}-${FULL_VERSION}-${ARCH}.breakpad" | 105 BPAD_SYM_NAME="${SRC_NAME}-${FULL_VERSION}-${ARCH}.breakpad" |
| 106 BPAD_SYM_PATH="${BUILT_PRODUCTS_DIR}/${BPAD_SYM_NAME}" | 106 BPAD_SYM_PATH="${BUILT_PRODUCTS_DIR}/${BPAD_SYM_NAME}" |
| 107 | 107 |
| 108 # Only run dump_syms if the file has changed since the last dump. | 108 # Only run dump_syms if the file has changed since the last dump. Use -c to |
| 109 # avoid dumping CFI, because the Breakpad stackwalk is incompatible with CFI |
| 110 # produced by clang. |
| 111 # http://code.google.com/p/google-breakpad/issues/detail?id=443 |
| 109 if [ "${DWARF_PATH}" -nt "${BPAD_SYM_PATH}" ] ; then | 112 if [ "${DWARF_PATH}" -nt "${BPAD_SYM_PATH}" ] ; then |
| 110 "${BREAKPAD_DUMP_SYMS}" -a "${ARCH}" "${DWARF_PATH}" > "${BPAD_SYM_PATH}" | 113 "${BREAKPAD_DUMP_SYMS}" -a "${ARCH}" -c "${DWARF_PATH}" > "${BPAD_SYM_PATH}" |
| 111 fi | 114 fi |
| 112 | 115 |
| 113 # Some executables will show up with variant names. The Breakpad symbol | 116 # Some executables will show up with variant names. The Breakpad symbol |
| 114 # server looks up modules based on a combination of the module name and | 117 # server looks up modules based on a combination of the module name and |
| 115 # identifier (UUID). Produce symbol files for these variant names so that | 118 # identifier (UUID). Produce symbol files for these variant names so that |
| 116 # the Breakpad symbol server will have something to return for stacks that | 119 # the Breakpad symbol server will have something to return for stacks that |
| 117 # travel through these modules. | 120 # travel through these modules. |
| 118 case "${SRC_NAME}" in | 121 case "${SRC_NAME}" in |
| 119 "${SRC_APP_NAME}.app") | 122 "${SRC_APP_NAME}.app") |
| 120 # Google Chrome Canary is produced during packaging. | 123 # Google Chrome Canary is produced during packaging. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 142 # the .dSYM archive if a new one is needed | 145 # the .dSYM archive if a new one is needed |
| 143 DSYMS[${#DSYMS[@]}]="${DSYM_NAME}" | 146 DSYMS[${#DSYMS[@]}]="${DSYM_NAME}" |
| 144 done | 147 done |
| 145 | 148 |
| 146 # Create the archive of .dSYM bundles. | 149 # Create the archive of .dSYM bundles. |
| 147 if [ ! -e "${DSYM_TAR_PATH}" ] ; then | 150 if [ ! -e "${DSYM_TAR_PATH}" ] ; then |
| 148 # Change directory so that absolute paths aren't included in the archive. | 151 # Change directory so that absolute paths aren't included in the archive. |
| 149 (cd "${BUILT_PRODUCTS_DIR}" && | 152 (cd "${BUILT_PRODUCTS_DIR}" && |
| 150 tar -jcf "${DSYM_TAR_PATH}" "${DSYMS[@]}") | 153 tar -jcf "${DSYM_TAR_PATH}" "${DSYMS[@]}") |
| 151 fi | 154 fi |
| OLD | NEW |