Mark DWARF lines in non-debuggable methods as "not a statement".
This is a hint to the debugger that breakpoints and stepping
might not function as intended (since we have limited information).
Change-Id: I23c4a816182cc7548fcd69fbd00112225e7b1710
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index b49b91d..42f22af 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -913,7 +913,8 @@
return false;
}
- if (GetCompilerDriver()->GetCompilerOptions().GetGenerateDebugInfo()) {
+ const CompilerOptions& compiler_options = GetCompilerDriver()->GetCompilerOptions();
+ if (compiler_options.GetGenerateDebugInfo()) {
const auto* method_header = reinterpret_cast<const OatQuickMethodHeader*>(code);
const uintptr_t code_address = reinterpret_cast<uintptr_t>(method_header->GetCode());
CompiledMethod compiled_method(
@@ -936,6 +937,7 @@
access_flags,
code_item,
false, // deduped.
+ compiler_options.GetNativeDebuggable(),
code_address,
code_address + code_allocator.GetSize(),
&compiled_method