diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-08 16:59:35 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-08 16:59:35 +0000 |
commit | f1852f29f57531e69ce0d4b6ffafb4a9e9b511c2 (patch) | |
tree | 8d398774c353ae19434b9bbca7c566c8492dabd0 /chrome/tools | |
parent | 1512d202307f656c0f9c47b6f4f9d2daa594ae98 (diff) | |
download | chromium_src-f1852f29f57531e69ce0d4b6ffafb4a9e9b511c2.zip chromium_src-f1852f29f57531e69ce0d4b6ffafb4a9e9b511c2.tar.gz chromium_src-f1852f29f57531e69ce0d4b6ffafb4a9e9b511c2.tar.bz2 |
Add a --gdb flag to chrome-wrapper to make it easier to debug
shared library builds.
Review URL: http://codereview.chromium.org/3548019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61968 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/tools')
-rwxr-xr-x | chrome/tools/build/linux/chrome-wrapper | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/chrome/tools/build/linux/chrome-wrapper b/chrome/tools/build/linux/chrome-wrapper index a04292f..a2a1188 100755 --- a/chrome/tools/build/linux/chrome-wrapper +++ b/chrome/tools/build/linux/chrome-wrapper @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Copyright (c) 2010 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be @@ -130,4 +130,20 @@ export CHROME_VERSION_EXTRA="custom" exists_desktop_file || generate_desktop_file -exec "$HERE/chrome" "$@" +CMD_PREFIX= +ARGS=() +while [ "$#" -gt 0 ]; do + case "$1" in + "--") + shift + break ;; + "--gdb") + CMD_PREFIX="gdb --args" ;; + *) + ARGS=( "${ARGS[@]}" "$1" ) ;; + esac + shift +done +set -- "${ARGS[@]}" "$@" + +exec $CMD_PREFIX "$HERE/chrome" "$@" |