Mojo C++ bindings: better log message for serialization warnings.
[chromium-blink-merge.git] / remoting / scripts / mac / dump_product_syms
blob7c53948de044c362e8595383c3dc6c9324cd2a06
1 #!/bin/bash
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
7 set -eu
9 if [[ "$#" -ne 1 ]]; then
10 echo "usage: $0 <version>" >&2
11 echo "(BUILT_PRODUCTS_DIR and FULL_PRODUCT_NAME must be set)" >& 2
12 exit 1
15 VERSION="$1"
16 DUMP_SYMS_TOOL="${BUILT_PRODUCTS_DIR}/dump_syms"
17 SOURCE_BUNDLE="${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}"
19 # Filename of bundle, minus the file extension.
20 STEM="$(basename "${SOURCE_BUNDLE%.*}")"
21 DWARF_PATH="${SOURCE_BUNDLE}.dSYM/Contents/Resources/DWARF/${STEM}"
23 ARCHS=$(file "${DWARF_PATH}" | sed -Ene 's/^.*(i386|x86_64)$/\1/p')
24 if [[ -z "${ARCHS}" ]]; then
25 echo "$0: expected something dumpable in ${DWARF_PATH}" >& 2
26 exit 1
29 for ARCH in ${ARCHS}; do
30 # Use -c to avoid dumping CFI, because the Breakpad stackwalk is incompatible
31 # with CFI produced by clang.
32 # http://code.google.com/p/google-breakpad/issues/detail?id=443
33 "${DUMP_SYMS_TOOL}" -a "${ARCH}" -c "${DWARF_PATH}" > \
34 "${SOURCE_BUNDLE}-${VERSION}-${ARCH}.breakpad"
35 done