| Index: chrome/tools/build/mac/dump_product_syms
|
| ===================================================================
|
| --- chrome/tools/build/mac/dump_product_syms (revision 98647)
|
| +++ chrome/tools/build/mac/dump_product_syms (working copy)
|
| @@ -47,6 +47,30 @@
|
|
|
| DSYM_TAR_PATH="${BUILT_PRODUCTS_DIR}/${SRC_APP_NAME}.dSYM.tar.bz2"
|
|
|
| +# Starting with an already-dumped symbol file at ${original_sym_path},
|
| +# transforms the MODULE line (which must be the first line) from referring to
|
| +# ${original_stem} to refer to ${variant_stem}. The transformed symbol file
|
| +# is written to a symbol file at the same location that a symbol file would
|
| +# be written to if ${variant_name} were in the SRC_NAMES array below.
|
| +#
|
| +# If the transformed symbol file already appears more recent than
|
| +# ${original_sym_path}, it is left alone.
|
| +redump_syms_variant() {
|
| + local original_sym_path="${1}"
|
| + local original_stem="${2}"
|
| + local variant_stem="${3}"
|
| + local variant_name="${4}"
|
| +
|
| + local variant_sym_name="${variant_name}-${FULL_VERSION}-${ARCH}.breakpad"
|
| + local variant_sym_path="${BUILT_PRODUCTS_DIR}/${variant_sym_name}"
|
| +
|
| + if [[ "${original_sym_path}" -nt "${variant_sym_path}" ]]; then
|
| + local pattern="\
|
| +1s/^(MODULE [^ ]+ [^ ]+ [0-9a-fA-F]{33}) ${original_stem}\$/\1 ${variant_stem}/"
|
| + sed -E -e "${pattern}" < "${original_sym_path}" > "${variant_sym_path}"
|
| + fi
|
| +}
|
| +
|
| declare -a DSYMS
|
|
|
| # Everything in SRC_NAMES is required. It's an error for any of these files
|
| @@ -86,6 +110,28 @@
|
| "${BREAKPAD_DUMP_SYMS}" -a "${ARCH}" "${DWARF_PATH}" > "${BPAD_SYM_PATH}"
|
| fi
|
|
|
| + # Some executables will show up with variant names. The Breakpad symbol
|
| + # server looks up modules based on a combination of the module name and
|
| + # identifier (UUID). Produce symbol files for these variant names so that
|
| + # the Breakpad symbol server will have something to return for stacks that
|
| + # travel through these modules.
|
| + case "${SRC_NAME}" in
|
| + "${SRC_APP_NAME}.app")
|
| + # Google Chrome Canary is produced during packaging.
|
| + redump_syms_variant "${BPAD_SYM_PATH}" "${SRC_STEM}" \
|
| + "${SRC_STEM} Canary" "${SRC_STEM} Canary.app"
|
| + ;;
|
| +
|
| + "${SRC_APP_NAME} Helper.app")
|
| + # Google Chrome Helper EH and Google Chrome Helper NP are produced by
|
| + # chrome/tools/build/mac/make_more_helpers.sh.
|
| + redump_syms_variant "${BPAD_SYM_PATH}" "${SRC_STEM}" \
|
| + "${SRC_STEM} EH" "${SRC_STEM} EH.app"
|
| + redump_syms_variant "${BPAD_SYM_PATH}" "${SRC_STEM}" \
|
| + "${SRC_STEM} NP" "${SRC_STEM} NP.app"
|
| + ;;
|
| + esac
|
| +
|
| # Remove the .dSYM archive if the file has changed since the archive was
|
| # last generated. This will cause a new .dSYM archive to be created.
|
| if [ "${DWARF_PATH}" -nt "${DSYM_TAR_PATH}" ] ; then
|
|
|