summaryrefslogtreecommitdiffstats
path: root/chrome/tools
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-08 16:59:35 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-08 16:59:35 +0000
commitf1852f29f57531e69ce0d4b6ffafb4a9e9b511c2 (patch)
tree8d398774c353ae19434b9bbca7c566c8492dabd0 /chrome/tools
parent1512d202307f656c0f9c47b6f4f9d2daa594ae98 (diff)
downloadchromium_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-xchrome/tools/build/linux/chrome-wrapper20
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" "$@"