Fix DWARF line-number generation for JITed methods.
Don't strip, repack or compress debug-info if explicitly
requested by the developer (using the -g compiler flag).
If enabled, the DWARF debug info has about 1:1 size
overhead relative to JIT code + data.
Bug: 131422204
Test: Check that gdb shows line numbers for JITed method.
Test: Hard-code always-enable generation and run maps.
Change-Id: If06de8ae2317af4d57d84e8a8bfae86a597dd4e4
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index f4bf11d..c799b12 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -1482,7 +1482,7 @@
AddNativeDebugInfoForJit(Thread::Current(),
reinterpret_cast<const void*>(info.code_address),
elf_file,
- debug::PackElfFileForJIT,
+ mini_debug_info ? debug::PackElfFileForJIT : nullptr,
compiler_options.GetInstructionSet(),
compiler_options.GetInstructionSetFeatures());
}