Граф коммитов

11 Коммитов

Автор SHA1 Сообщение Дата
eugenis@chromium.org 7f616a3d81 adb_gdb: AddressSanitizer support.
When running with AddressSanitizer, the main executable of Android
applications is /system/bin/app_process.real instead of the usual
/system/bin/app_process. This change helps adb_gdb detect this
situation.

See tools/android/asan/asan_device_setup.sh for more details.

R=bulach@chromium.org, digit@chromium.org
BUG=

Review URL: https://codereview.chromium.org/150233002

git-svn-id: http://src.chromium.org/svn/trunk/src/build@248186 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-01-31 14:08:32 +00:00
bulach@chromium.org c57d85ac3c Android: fixes out dir for adb_gdb with cr tool.
Use the CHROMIUM_OUT_DIR variable when available.

BUG=
NOTRY=True

Review URL: https://codereview.chromium.org/77843003

git-svn-id: http://src.chromium.org/svn/trunk/src/build@237571 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-11-27 14:34:36 +00:00
shashishekhar@chromium.org 74a69f6031 Fix adb_gdb script.
Fix a typo in the script.
BUG=304931
R=digit@chromium.org

Review URL: https://codereview.chromium.org/26337002

git-svn-id: http://src.chromium.org/svn/trunk/src/build@227340 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-10-07 20:50:49 +00:00
adam.treat@samsung.com 05af1447e1 Fix the adb_gdb script to honor the --gdb flag for a user specified gdb binary according to the existing usage.
BUG=295807

Review URL: https://codereview.chromium.org/23513083

git-svn-id: http://src.chromium.org/svn/trunk/src/build@226514 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-10-02 18:56:35 +00:00
peter@chromium.org 988c006f9b Remove the Android DumpRenderTree GDB helper script.
BUG=

Review URL: https://chromiumcodereview.appspot.com/23517004

git-svn-id: http://src.chromium.org/svn/trunk/src/build@221011 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-09-03 20:15:58 +00:00
digit@chromium.org eacb40c9e0 adb_gdb: Minor improvements
This patch improves the Android-specific adb_gdb debugging scripts
in several minor ways:

- It ensures that the temporary directory is always removed when
  the script exits, even whe it is interrupted with Ctrl-C.

- It ensures that if --pull-libs is interrupted by a Ctrl-C,
  the build.prop in /tmp/$USER-adb-gdb-libs/ is erased, forcing
  a --pull-libs operation in the next invokation, instead of keeping
  a portion of the libraries in a bad state.

- It adds a --su-prefix=<prefix> option, to be able to use tools
  like 'su' on rooted production devices. This is useful when the
  installed app is not debuggable (e.g. a release build), and there
  is no way to run ADB as root.

BUG=NONE

Review URL: https://chromiumcodereview.appspot.com/17103007

git-svn-id: http://src.chromium.org/svn/trunk/src/build@206990 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-06-18 14:24:42 +00:00
qsr@chromium.org 5a27adb121 Adding option to use gdbtui instead of gdb to adb_gdb
R=digit@chromium.org

Review URL: https://chromiumcodereview.appspot.com/15705005

git-svn-id: http://src.chromium.org/svn/trunk/src/build@202855 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-05-29 13:51:02 +00:00
digit@chromium.org e1c77a52b3 Do not use $ANDROID_TOOLCHAIN set by envsetup.sh.
This reverts the changes from commit 6394facfcd6150a69be418212f1caff2f6639540
and instead improves the adb_gdb script to properly auto-detect the right
location of the toolchain binaries.

This means that on a Linux 64-bit systems, it will first try to find the
64-bit binaries, and if not available, will fallback to 32-bit ones.

Tested with the default toolchain from third_party/android_tools/ndk/
(64-bit) and with --ndk-dir=/path/to/android-ndk-r8d (32-bit).

Also remove "gdb_apk" and "gdb_content_shell" which were obsoleted by
"adb_gdb" and "adb_gdb_content_shell", respectively.

BUG=none
R=yfriedman@chromium.org,navabi@chromium.org,wangxianzhu@chromium.org

Review URL: https://chromiumcodereview.appspot.com/14910010

git-svn-id: http://src.chromium.org/svn/trunk/src/build@200547 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-05-16 16:19:41 +00:00
wangxianzhu@chromium.org a4820b81b7 Use $ANDROID_TOOLCHAIN set by envsetup.sh in adb_gdb and gdb_apk
After recent upgradation to third_party/android_tools/ndk, there is no
linux-x86 toolchain directory any more, but linux-x86_64 instead. This
causes failure of adb_gdb and gdb_apk which hard-coded linux-x86
in the scripts. As envsetup.sh already set correct $ANDROID_TOOLCHAIN,
now use it in the scripts instead of the hardcoded one.

BUG=none
NOTRY=true (presubmit passed)

Review URL: https://chromiumcodereview.appspot.com/15028013

git-svn-id: http://src.chromium.org/svn/trunk/src/build@199567 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-05-10 23:14:37 +00:00
mkosiba@chromium.org e72ab1e31a [android] Fix the adb_gdb script.
The ndk under third_party was updated to not contain the 32-bit toolchains
but the script continues to reference those.

BUG=
NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/14858018

git-svn-id: http://src.chromium.org/svn/trunk/src/build@199234 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-05-09 17:25:15 +00:00
digit@chromium.org 6b6e39e427 Android: Add new debugging scripts (adb_gdb_xxx)
This patch adds several new scripts to help debug Chromium
programs on Android devices. The old "gdb_apk" and
"gdb_content_shell" are now *deprecated* and will be
removed shortly.

The new scripts are significantly more sophisticated than
the previous ones:

 - They pull the system libraries from the device into a
   temporary directory. This allows you to have much more
   symbol information in back traces.

   The scripts will not re-download the libraries if you
   use the same device again. However, they will
   automatically detect they're connected to a new
   device a download new versions of the system libraries.

   You can control this behaviour with several options
   (--pull-libs, --no-pull-libs and --pull-libs-dir)

 - The --verbose option can be used to dump useful
   information about what's going on in case of problems.

 - The --script=<file> option can be used to pass GDB
   initialization commands that will be run after the
   program has been properly attached (handy to set
   breakpoints, signal handlers and printers).

 - Works for both ARM and x86 devices. Should work
   automatically for MIPS ones (provided a Chromium build
   exists for this architecture).

 - Works properly on all production devices. I.e. you don't
   need to run ADB as root.

 - Supports attaching to renderer processes with the
   --sandboxed and --sandboxed=<num> option.

   Special note: starting from JellyBean (4.1), you
   *need* to run ADB as root to be able to attach to
   sandboxed renderer processes. This is a platform
   limitation.

 - Automatically detects the most recent build directory.
   This means there is no need to set BUILDTYPE in your
   environment, and both Make-based and ninja-based builds
   are supported (they don't place target libraries at the
   same location).

 - Generally speaking, much better handling of edge
   cases, and proper cleanup when the script terminates
   (either normally or through exceptions like Ctrl-C).

For complete details, use the --help option of each script.

By default, each script tries to attach to a running instance
of the program, but you can use the --start option to start
it automatically.

Note that 'adb_gdb' script is generic and can be used to
debug any Chromium Android application, as long as you
know its package name and activity name.

'adb_gdb_content_shell' et al at just convenience scripts
around 'adb_gdb' that hard-code these values for you.

Its trivial to write other wrapper scripts for other
packages if you wish so.

BUG=


Review URL: https://chromiumcodereview.appspot.com/11187027

git-svn-id: http://src.chromium.org/svn/trunk/src/build@162704 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-10-18 14:53:26 +00:00