Optionally add debug symbols to ELF files made by quick compiler.
Added debug symbols to ELF files created by dex2oat using
the quick compiler. Adds two flags --include-debug-symbols and
--no-include-debug-symbols for dex2oat that control the inclusion of these
debug symbols. Debug info is added by default if kIsDebugBuild is true.
Fixed bug where Intel DWARF information would not correctly deal with
deduplicated code the binary.
Changed the portable compiler code path in dex2oat.cc so that symbols
will not be stripped when run with --include-debug-symbols.
Change-Id: Ia2eb2f654dedf0e5e8606f7744e05b8d14155fb1
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h
index fad6798..9903421 100644
--- a/compiler/driver/compiler_driver.h
+++ b/compiler/driver/compiler_driver.h
@@ -28,6 +28,7 @@
#include "compiled_method.h"
#include "compiler.h"
#include "dex_file.h"
+#include "driver/compiler_options.h"
#include "instruction_set.h"
#include "invoke_type.h"
#include "method_reference.h"
@@ -105,8 +106,7 @@
InstructionSetFeatures instruction_set_features,
bool image, DescriptorSet* image_classes,
size_t thread_count, bool dump_stats, bool dump_passes,
- CumulativeLogger* timer,
- std::string profile_file = "");
+ CumulativeLogger* timer, std::string profile_file = "");
~CompilerDriver();
@@ -394,6 +394,10 @@
return dump_passes_;
}
+ bool DidIncludeDebugSymbols() const {
+ return compiler_options_->GetIncludeDebugSymbols();
+ }
+
CumulativeLogger* GetTimingsLogger() const {
return timings_logger_;
}