summaryrefslogtreecommitdiffstats
path: root/remoting/scripts/mac
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/scripts/mac')
-rwxr-xr-xremoting/scripts/mac/dump_product_syms27
1 files changed, 27 insertions, 0 deletions
diff --git a/remoting/scripts/mac/dump_product_syms b/remoting/scripts/mac/dump_product_syms
new file mode 100755
index 0000000..cc54a97
--- /dev/null
+++ b/remoting/scripts/mac/dump_product_syms
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+set -eu
+
+if [[ "$#" -ne 3 ]]; then
+ echo "$0 <dump_syms_tool> <mac_bundle> <breakpad_symbols>" >&2
+ exit 1
+fi
+
+DUMP_SYMS_TOOL="$1"
+SOURCE_BUNDLE="$2"
+BREAKPAD_SYMBOLS="$3"
+
+ARCH="i386"
+
+# Filename of bundle, minus the file extension.
+STEM="$(basename "${SOURCE_BUNDLE%.*}")"
+DWARF_PATH="${SOURCE_BUNDLE}.dSYM/Contents/Resources/DWARF/${STEM}"
+
+# Use -c to avoid dumping CFI, because the Breakpad stackwalk is incompatible
+# with CFI produced by clang.
+# http://code.google.com/p/google-breakpad/issues/detail?id=443
+"${DUMP_SYMS_TOOL}" -a "${ARCH}" -c "${DWARF_PATH}" > "${BREAKPAD_SYMBOLS}"