| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 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 | 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 # This is a small script for manually launching valgrind, along with passing | 7 # This is a small script for manually launching valgrind, along with passing |
| 8 # it the suppression file, and some helpful arguments (automatically attaching | 8 # it the suppression file, and some helpful arguments (automatically attaching |
| 9 # the debugger on failures, etc). Run it from your repo root, something like: | 9 # the debugger on failures, etc). Run it from your repo root, something like: |
| 10 # $ sh ./tools/valgrind/valgrind.sh ./sconsbuild/Debug/chrome | 10 # $ sh ./tools/valgrind/valgrind.sh ./out/Debug/chrome |
| 11 # | 11 # |
| 12 # This is mostly intended for running the chrome browser interactively. | 12 # This is mostly intended for running the chrome browser interactively. |
| 13 # To run unit tests, you probably want to run chrome_tests.sh instead. | 13 # To run unit tests, you probably want to run chrome_tests.sh instead. |
| 14 # That's the script used by the valgrind buildbot. | 14 # That's the script used by the valgrind buildbot. |
| 15 | 15 |
| 16 export THISDIR=`dirname $0` | 16 export THISDIR=`dirname $0` |
| 17 | 17 |
| 18 setup_memcheck() { | 18 setup_memcheck() { |
| 19 RUN_COMMAND="valgrind" | 19 RUN_COMMAND="valgrind" |
| 20 # Prefer a 32-bit gdb if it's available. | 20 # Prefer a 32-bit gdb if it's available. |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 G_SLICE=always-malloc \ | 103 G_SLICE=always-malloc \ |
| 104 NSS_DISABLE_ARENA_FREE_LIST=1 \ | 104 NSS_DISABLE_ARENA_FREE_LIST=1 \ |
| 105 G_DEBUG=fatal_warnings \ | 105 G_DEBUG=fatal_warnings \ |
| 106 GTEST_DEATH_TEST_USE_FORK=1 \ | 106 GTEST_DEATH_TEST_USE_FORK=1 \ |
| 107 $RUN_COMMAND \ | 107 $RUN_COMMAND \ |
| 108 --trace-children=yes \ | 108 --trace-children=yes \ |
| 109 --suppressions="$SUPPRESSIONS" \ | 109 --suppressions="$SUPPRESSIONS" \ |
| 110 "${DEFAULT_TOOL_FLAGS[@]}" \ | 110 "${DEFAULT_TOOL_FLAGS[@]}" \ |
| 111 "$@" | 111 "$@" |
| OLD | NEW |