Always generate JIT mini-debug-info for debuggable apps.
Change-Id: I863ae20cab5a86fc63bf34fde17c9181308a459c
diff --git a/runtime/native/dalvik_system_ZygoteHooks.cc b/runtime/native/dalvik_system_ZygoteHooks.cc
index e22726b..9e125cf 100644
--- a/runtime/native/dalvik_system_ZygoteHooks.cc
+++ b/runtime/native/dalvik_system_ZygoteHooks.cc
@@ -229,6 +229,8 @@
bool needs_non_debuggable_classes = false;
if ((runtime_flags & DEBUG_JAVA_DEBUGGABLE) != 0) {
runtime->AddCompilerOption("--debuggable");
+ // Generate native debug information to allow backtracing through JITed code.
+ runtime->AddCompilerOption("--generate-mini-debug-info");
runtime->SetJavaDebuggable(true);
// Deoptimize the boot image as it may be non-debuggable.
runtime->DeoptimizeBootImage();
@@ -241,6 +243,7 @@
if ((runtime_flags & DEBUG_NATIVE_DEBUGGABLE) != 0) {
runtime->AddCompilerOption("--debuggable");
+ // Generate all native debug information we can (e.g. line-numbers).
runtime->AddCompilerOption("--generate-debug-info");
runtime->SetNativeDebuggable(true);
runtime_flags &= ~DEBUG_NATIVE_DEBUGGABLE;