Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: build/android/gdb_content_shell

Issue 10448096: Add native debugging support for no-root mode (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gdb_content_shell
diff --git a/build/android/gdb_content_shell b/build/android/gdb_content_shell
index 94c0962872f7de9079aaef14f42fd64e0cf77b08..2f0b9830c6fbe4ac3d2bd9653257d4ddb2e17687 100755
--- a/build/android/gdb_content_shell
+++ b/build/android/gdb_content_shell
@@ -17,12 +17,12 @@ if [[ "$adb" = "" ]] ; then
exit 1
fi
-# TODO(jrg): non-rooted path speculative and untested.
-rooted_phone=1
+rooted_phone=0
root=$(dirname $0)/../..
package_name=org.chromium.content_shell
-gdb_server_on_device=/data/data/$package_name/lib/gdbserver
+data_dir=/data/data/$package_name
+gdb_server_on_device=$data_dir/lib/gdbserver
shared_lib_dir=$root/out/Release/lib.target
# Kill any running gdbserver
@@ -50,15 +50,12 @@ if [[ "$no_gdb_server" != "" ]] ; then
exit 3
fi
-adb forward tcp:4321 tcp:4321
-
-# TODO(jrg): Consider a closer match to ndk-gdb which uses subtly
-# different semantics for both port forwarding and launching
-# gdbserver.
if [[ $rooted_phone -eq 1 ]] ; then
adb shell $gdb_server_on_device :4321 --attach $pid &
+ adb forward tcp:4321 tcp:4321
else
- adb shell run-as $package_name $gdb_server_on_device :4321 --attach $pid &
+ adb shell run-as $package_name lib/gdbserver +debug-socket --attach $pid &
+ adb forward tcp:4321 localfilesystem:$data_dir/debug-socket
fi
sleep 2
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698