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

Side by Side Diff: build/linux/dump_app_syms

Issue 126015: Extract breakpad symbol files for Linux official builds. (Closed)
Patch Set: shell out to helper script Created 11 years, 6 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
« no previous file with comments | « no previous file | build/linux/dump_signature.py » ('j') | build/linux/dump_signature.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/bin/sh
Mark Mentovai 2009/06/12 17:30:10 svn:executable and svn:eol-style?
2
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
5 # found in the LICENSE file.
6 #
7 # Helper script to run dump_syms on Chrome Linux executables and "fixup" the
8 # generated sigs (due to changes to the binary from stripping).
9
10 set -e
11
12 usage() {
13 echo "$0 <dump_syms_exe> <binary_with_symbols> <symbols_output>"
14 }
15
16
17 if [ $# -ne 3 ]; then
18 usage
19 exit 1
20 fi
21
22 SCRIPTDIR="$(readlink -f "$(dirname "$0")")"
23 DUMPSYMS="$1"
24 INFILE="$2"
25 OUTFILE="$3"
26
27 STRIPPED=$(mktemp -q -t stripped-XXXXX)
28 if [ $? -ne 0 ]; then
29 echo "ERROR: Could not create temp stripped '$INFILE'"
Mark Mentovai 2009/06/12 17:30:10 echo blah >& 2 (also for usage()?)
30 exit 1
31 fi
32
33 # Dump the symbols from the given binary.
34 "$DUMPSYMS" "$INFILE" > "$OUTFILE"
Mark Mentovai 2009/06/12 17:30:10 In the Mac version of this script, we have an -nt
35
36 # Strip the binary and calculate the signature of that, since that's what ships.
37 strip "$INFILE" -o "$STRIPPED"
38 NEWSIG=$("$SCRIPTDIR/dump_signature.py" "$STRIPPED")
39 rm "$STRIPPED"
40
41 # Replace the old signature with the stripped signature in the symbols file.
42 INFILE_BASE=$(basename "$INFILE")
43 sed -i "1s/[0-9A-F]* $INFILE_BASE/$NEWSIG $INFILE_BASE/" "$OUTFILE"
Mark Mentovai 2009/06/12 17:30:10 This is slightly dangerous in the general case bec
44
Mark Mentovai 2009/06/12 17:30:10 nit: blank line at EOF doesn't contribute anything
OLDNEW
« no previous file with comments | « no previous file | build/linux/dump_signature.py » ('j') | build/linux/dump_signature.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698