Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Side by Side Diff: build/mac/dump_app_syms

Issue 164325: Save debugging symbols for plugin_carbon_interpose.dylib (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2009 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 . "${TOP}/chrome/VERSION" 42 . "${TOP}/chrome/VERSION"
43 43
44 BREAKPAD_DUMP_SYMS="${BUILT_PRODUCTS_DIR}/dump_syms" 44 BREAKPAD_DUMP_SYMS="${BUILT_PRODUCTS_DIR}/dump_syms"
45 FULL_VERSION="${MAJOR}.${MINOR}.${BUILD}.${PATCH}" 45 FULL_VERSION="${MAJOR}.${MINOR}.${BUILD}.${PATCH}"
46 ARCH="i386" 46 ARCH="i386"
47 47
48 DSYM_TAR_PATH="${BUILT_PRODUCTS_DIR}/${SRC_APP_NAME}.dSYM.tar.bz2" 48 DSYM_TAR_PATH="${BUILT_PRODUCTS_DIR}/${SRC_APP_NAME}.dSYM.tar.bz2"
49 49
50 declare -a DSYMS 50 declare -a DSYMS
51 51
52 for SRC_BUNDLE in "${SRC_APP_NAME}.app" \ 52 for SRC_NAME in "${SRC_APP_NAME}.app" \
53 "${SRC_APP_NAME} Framework.framework" \ 53 "${SRC_APP_NAME} Framework.framework" \
54 "${SRC_APP_NAME} Helper.app" ; do 54 "${SRC_APP_NAME} Helper.app" \
55 SRC_STEM=$(echo "${SRC_BUNDLE}" | sed -Ee 's/^(.*)\..*$/\1/') 55 "plugin_carbon_interpose.dylib" ; do
56 SRC_BUNDLE_PATH="${BUILT_PRODUCTS_DIR}/${SRC_BUNDLE}" 56 # SRC_STEM is the name of the file within the DWARF directory of the .dSYM
57 DSYM_NAME="${SRC_BUNDLE}.dSYM" 57 # bundle, which comes from the on-disk name of an executable or dylib within
58 # its enclosing .app or .framework bundle. This is the bundle name without
59 # .app or .framework appended. For non-bundled types, the stem is just the
60 # name of the singlular file on disk.
61 SRC_STEM=$(echo "${SRC_NAME}" | sed -Ee 's/^(.*)\.(app|framework)$/\1/')
62 DSYM_NAME="${SRC_NAME}.dSYM"
58 DSYM_PATH="${BUILT_PRODUCTS_DIR}/${DSYM_NAME}" 63 DSYM_PATH="${BUILT_PRODUCTS_DIR}/${DSYM_NAME}"
59 DWARF_PATH="${DSYM_PATH}/Contents/Resources/DWARF/${SRC_STEM}" 64 DWARF_PATH="${DSYM_PATH}/Contents/Resources/DWARF/${SRC_STEM}"
60 BPAD_SYM_NAME="${SRC_STEM}-${FULL_VERSION}-${ARCH}.breakpad" 65 BPAD_SYM_NAME="${SRC_NAME}-${FULL_VERSION}-${ARCH}.breakpad"
61 BPAD_SYM_PATH="${BUILT_PRODUCTS_DIR}/${BPAD_SYM_NAME}" 66 BPAD_SYM_PATH="${BUILT_PRODUCTS_DIR}/${BPAD_SYM_NAME}"
62 67
63 # Only run dump_syms if the file has changed since the last dump. 68 # Only run dump_syms if the file has changed since the last dump.
64 if [ "${DWARF_PATH}" -nt "${BPAD_SYM_PATH}" ] ; then 69 if [ "${DWARF_PATH}" -nt "${BPAD_SYM_PATH}" ] ; then
65 "${BREAKPAD_DUMP_SYMS}" -a "${ARCH}" "${DWARF_PATH}" > "${BPAD_SYM_PATH}" 70 "${BREAKPAD_DUMP_SYMS}" -a "${ARCH}" "${DWARF_PATH}" > "${BPAD_SYM_PATH}"
66 fi 71 fi
67 72
68 # Remove the .dSYM archive if the file has changed since the archive was 73 # Remove the .dSYM archive if the file has changed since the archive was
69 # last generated. This will cause a new .dSYM archive to be created. 74 # last generated. This will cause a new .dSYM archive to be created.
70 if [ "${DWARF_PATH}" -nt "${DSYM_TAR_PATH}" ] ; then 75 if [ "${DWARF_PATH}" -nt "${DSYM_TAR_PATH}" ] ; then
71 rm -f "${DSYM_TAR_PATH}" 76 rm -f "${DSYM_TAR_PATH}"
72 fi 77 fi
73 78
74 # Push the .dSYM bundle onto the DSYMS array so that it will be included in 79 # Push the .dSYM bundle onto the DSYMS array so that it will be included in
75 # the .dSYM archive if a new one is needed 80 # the .dSYM archive if a new one is needed
76 DSYMS[${#DSYMS[@]}]="${DSYM_NAME}" 81 DSYMS[${#DSYMS[@]}]="${DSYM_NAME}"
77 done 82 done
78 83
79 # Create the archive of .dSYM bundles. 84 # Create the archive of .dSYM bundles.
80 if [ ! -e "${DSYM_TAR_PATH}" ] ; then 85 if [ ! -e "${DSYM_TAR_PATH}" ] ; then
81 # Change directory so that absolute paths aren't included in the archive. 86 # Change directory so that absolute paths aren't included in the archive.
82 (cd "${BUILT_PRODUCTS_DIR}" && 87 (cd "${BUILT_PRODUCTS_DIR}" &&
83 tar --owner 0 --group 0 -jcf "${DSYM_TAR_PATH}" "${DSYMS[@]}") 88 tar --owner 0 --group 0 -jcf "${DSYM_TAR_PATH}" "${DSYMS[@]}")
84 fi 89 fi
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698