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

Side by Side Diff: cros_show_stacks

Issue 6240018: This starts to fix the scripts so that they load from /usr/lib/crosutils (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: fixing bad merge Created 9 years, 10 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 | « cros_run_unit_tests ('k') | cros_workon » ('j') | 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) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 The Chromium OS 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 # Script to generate stackdumps from a machine or dmp files. 7 # Script to generate stackdumps from a machine or dmp files.
8 8
9 # Load common constants. This should be the first executable line. 9 # --- BEGIN COMMON.SH BOILERPLATE ---
10 # The path to common.sh should be relative to your script's location. 10 # Load common CrOS utilities. Inside the chroot this file is installed in
11 # /usr/lib/crosutils. Outside the chroot we find it relative to the script's
12 # location.
13 find_common_sh() {
14 local common_paths=(/usr/lib/crosutils $(dirname "$(readlink -f "$0")"))
15 local path
11 16
12 . "$(dirname $0)/common.sh" 17 SCRIPT_ROOT=
13 . "$(dirname $0)/remote_access.sh" 18 for path in "${common_paths[@]}"; do
19 if [ -r "${path}/common.sh" ]; then
20 SCRIPT_ROOT=${path}
21 break
22 fi
23 done
24 }
25
26 find_common_sh
27 . "${SCRIPT_ROOT}/common.sh" || (echo "Unable to load common.sh" && exit 1)
28 # --- END COMMON.SH BOILERPLATE ---
29
30 . "${SCRIPT_ROOT}/remote_access.sh" || die "Unable to load remote_access.sh"
14 31
15 assert_inside_chroot 32 assert_inside_chroot
16 33
17 MINIDUMP_DUMP=/usr/bin/minidump_dump 34 MINIDUMP_DUMP=/usr/bin/minidump_dump
18 MINIDUMP_STACKWALK=/usr/bin/minidump_stackwalk 35 MINIDUMP_STACKWALK=/usr/bin/minidump_stackwalk
19 USING_REMOTE=0 36 USING_REMOTE=0
20 37
21 get_default_board 38 get_default_board
22 39
23 DEFINE_string board "${DEFAULT_BOARD}" \ 40 DEFINE_string board "${DEFAULT_BOARD}" \
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 ${MINIDUMP_STACKWALK} "${dump}" "${FLAGS_breakpad_root}" 2> /dev/null 179 ${MINIDUMP_STACKWALK} "${dump}" "${FLAGS_breakpad_root}" 2> /dev/null
163 else 180 else
164 info "Dumping kcrash $(basename ${dump}):" 181 info "Dumping kcrash $(basename ${dump}):"
165 cat "${dump}" 182 cat "${dump}"
166 fi 183 fi
167 echo "" 184 echo ""
168 done 185 done
169 } 186 }
170 187
171 main "$@" 188 main "$@"
OLDNEW
« no previous file with comments | « cros_run_unit_tests ('k') | cros_workon » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698