Index: build/android/adb_gdb |
diff --git a/build/android/adb_gdb b/build/android/adb_gdb |
index 4ff4eea6560df421009fd15aaa6f36264fb1ec33..5d839dccfc80e02c1a8c4b528272610e7c65142a 100755 |
--- a/build/android/adb_gdb |
+++ b/build/android/adb_gdb |
@@ -18,6 +18,11 @@ PROGDIR=$(dirname "$0") |
# Location of Chromium-top-level sources. |
CHROMIUM_SRC=$(cd "$PROGDIR"/../.. && pwd 2>/dev/null) |
+# Location of Chromium out/ directory. |
+if [ -z "$CHROMIUM_OUT_DIR" ]; then |
+ CHROMIUM_OUT_DIR=out |
+fi |
+ |
TMPDIR= |
GDBSERVER_PIDFILE= |
TARGET_GDBSERVER= |
@@ -167,6 +172,9 @@ for opt; do |
--symbol-dir=*) |
SYMBOL_DIR=$optarg |
;; |
+ --out-dir=*) |
+ CHROMIUM_OUT_DIR=$optarg |
+ ;; |
--target-arch=*) |
TARGET_ARCH=$optarg |
;; |
@@ -248,10 +256,13 @@ directory. |
The script tries to find the most recent version of the debug version of |
shared libraries under one of the following directories: |
- \$CHROMIUM_SRC/out/Release/lib/ (used by Ninja builds) |
- \$CHROMIUM_SRC/out/Debug/lib/ (used by Ninja builds) |
- \$CHROMIUM_SRC/out/Release/lib.target/ (used by Make builds) |
- \$CHROMIUM_SRC/out/Debug/lib.target/ (used by Make builds) |
+ \$CHROMIUM_SRC/<out>/Release/lib/ (used by Ninja builds) |
+ \$CHROMIUM_SRC/<out>/Debug/lib/ (used by Ninja builds) |
+ \$CHROMIUM_SRC/<out>/Release/lib.target/ (used by Make builds) |
+ \$CHROMIUM_SRC/<out>/Debug/lib.target/ (used by Make builds) |
+ |
+Where <out> is 'out' by default, unless the --out=<name> option is used or |
+the CHROMIUM_OUT_DIR environment variable is defined. |
You can restrict this search by using --release or --debug to specify the |
build type, or simply use --symbol-dir=<path> to specify the file manually. |
@@ -295,6 +306,7 @@ Valid options: |
--sandboxed Debug first sandboxed process we find. |
--sandboxed=<num> Debug specific sandboxed process. |
--symbol-dir=<path> Specify directory with symbol shared libraries. |
+ --out-dir=<path> Specify the out directory. |
--package-name=<name> Specify package name (alternative to 1st argument). |
--program-name=<name> Specify program name (cosmetic only). |
--pid=<pid> Specify application process pid. |
@@ -672,7 +684,7 @@ get_file_timestamp () { |
# Detect the build type and symbol directory. This is done by finding |
# the most recent sub-directory containing debug shared libraries under |
-# $CHROMIUM_SRC/out/ |
+# $CHROMIUM_SRC/$CHROMIUM_OUT_DIR/ |
# |
# $1: $BUILDTYPE value, can be empty |
# Out: nothing, but this sets SYMBOL_DIR |
@@ -689,7 +701,7 @@ detect_symbol_dir () { |
LIST=$TMPDIR/scan-subdirs-$$.txt |
printf "" > "$LIST" |
for SUBDIR in $SUBDIRS; do |
- DIR=$CHROMIUM_SRC/out/$SUBDIR |
+ DIR=$CHROMIUM_SRC/$CHROMIUM_OUT_DIR/$SUBDIR |
if [ -d "$DIR" ]; then |
# Ignore build directories that don't contain symbol versions |
# of the shared libraries. |
@@ -708,14 +720,14 @@ detect_symbol_dir () { |
if [ -z "$SUBDIR" ]; then |
if [ -z "$1" ]; then |
panic "Could not find any build directory under \ |
-$CHROMIUM_SRC/out. Please build the program first!" |
+$CHROMIUM_SRC/$CHROMIUM_OUT_DIR. Please build the program first!" |
else |
panic "Could not find any $1 directory under \ |
-$CHROMIUM_SRC/out. Check your build type!" |
+$CHROMIUM_SRC/$CHROMIUM_OUT_DIR. Check your build type!" |
fi |
fi |
- SYMBOL_DIR=$CHROMIUM_SRC/out/$SUBDIR |
+ SYMBOL_DIR=$CHROMIUM_SRC/$CHROMIUM_OUT_DIR/$SUBDIR |
log "Auto-config: --symbol-dir=$SYMBOL_DIR" |
} |