diff options
author | Tamas Berghammer <tberghammer@google.com> | 2016-01-29 12:07:00 +0000 |
---|---|---|
committer | Tamas Berghammer <tberghammer@google.com> | 2016-02-01 13:49:32 +0000 |
commit | df6cb282937e5f804686ebbc952ae9f2290d93c7 (patch) | |
tree | 04617ce89d2846295ae33a020a8f5180992ff1a3 /cmds/am/src | |
parent | b61437de5f31d61698eec47221ca5fba1f76c61f (diff) |
Add flag to "am start" to enable native debugging
Specifying the new flag will enable several features in the runtime
required by the native debugger to debug Java and C++ code at the same
time.
The enabled features:
* Force JIT (never use the interpreter)
* Debug info generation
* Disbale some optimizations
Change-Id: Iaf5ab649715a0c274bd1b0fc64e483705da53cd0
Diffstat (limited to 'cmds/am/src')
-rw-r--r-- | cmds/am/src/com/android/commands/am/Am.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java index ba93b2a2cafe..8187468805c3 100644 --- a/cmds/am/src/com/android/commands/am/Am.java +++ b/cmds/am/src/com/android/commands/am/Am.java @@ -121,7 +121,7 @@ public class Am extends BaseCommand { PrintWriter pw = new PrintWriter(out); pw.println( "usage: am [subcommand] [options]\n" + - "usage: am start [-D] [-W] [-P <FILE>] [--start-profiler <FILE>]\n" + + "usage: am start [-D] [-N] [-W] [-P <FILE>] [--start-profiler <FILE>]\n" + " [--sampling INTERVAL] [-R COUNT] [-S]\n" + " [--track-allocation] [--user <USER_ID> | current] <INTENT>\n" + " am startservice [--user <USER_ID> | current] <INTENT>\n" + @@ -180,6 +180,7 @@ public class Am extends BaseCommand { "\n" + "am start: start an Activity. Options are:\n" + " -D: enable debugging\n" + + " -N: enable native debugging\n" + " -W: wait for launch to complete\n" + " --start-profiler <FILE>: start profiler and send results to <FILE>\n" + " --sampling INTERVAL: use sample profiling with INTERVAL microseconds\n" + @@ -473,6 +474,8 @@ public class Am extends BaseCommand { public boolean handleOption(String opt, ShellCommand cmd) { if (opt.equals("-D")) { mStartFlags |= ActivityManager.START_FLAG_DEBUG; + } else if (opt.equals("-N")) { + mStartFlags |= ActivityManager.START_FLAG_NATIVE_DEBUGGING; } else if (opt.equals("-W")) { mWaitOption = true; } else if (opt.equals("-P")) { |