OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # This is a small script for manually launching valgrind, along with passing | 6 # This is a small script for manually launching valgrind, along with passing |
7 # it the suppression file, and some helpful arguments (automatically attaching | 7 # it the suppression file, and some helpful arguments (automatically attaching |
8 # the debugger on failures, etc). Run it from your repo root, something like: | 8 # the debugger on failures, etc). Run it from your repo root, something like: |
9 # $ sh ./tools/valgrind/valgrind.sh ./chrome/Hammer/chrome | 9 # $ sh ./tools/valgrind/valgrind.sh ./sconsbuild/Debug/chrome |
10 # | 10 # |
11 # This is mostly intended for running the chrome browser interactively. | 11 # This is mostly intended for running the chrome browser interactively. |
12 # To run unit tests, you probably want to run chrome_tests.sh instead. | 12 # To run unit tests, you probably want to run chrome_tests.sh instead. |
13 # That's the script used by the valgrind buildbot. | 13 # That's the script used by the valgrind buildbot. |
14 | 14 |
15 set -e | 15 set -e |
16 | 16 |
17 if [ $# -eq 0 ]; then | 17 if [ $# -eq 0 ]; then |
18 echo "usage: <command to run> <arguments ...>" | 18 echo "usage: <command to run> <arguments ...>" |
19 exit 1 | 19 exit 1 |
(...skipping 26 matching lines...) Expand all Loading... |
46 NSS_DISABLE_ARENA_FREE_LIST=1 \ | 46 NSS_DISABLE_ARENA_FREE_LIST=1 \ |
47 G_DEBUG=fatal_warnings \ | 47 G_DEBUG=fatal_warnings \ |
48 "$VALGRIND" \ | 48 "$VALGRIND" \ |
49 --trace-children=yes \ | 49 --trace-children=yes \ |
50 --db-command="$GDB -nw %f %p" \ | 50 --db-command="$GDB -nw %f %p" \ |
51 --db-attach=yes \ | 51 --db-attach=yes \ |
52 --suppressions="$SUPPRESSIONS" \ | 52 --suppressions="$SUPPRESSIONS" \ |
53 --malloc-fill=41 --free-fill=41 \ | 53 --malloc-fill=41 --free-fill=41 \ |
54 --smc-check=all \ | 54 --smc-check=all \ |
55 "$@" | 55 "$@" |
OLD | NEW |