summaryrefslogtreecommitdiffstats
path: root/oatdump
diff options
context:
space:
mode:
authorDavid Srbecky <dsrbecky@google.com>2017-12-04 14:39:21 +0000
committerDavid Srbecky <dsrbecky@google.com>2018-01-12 17:21:15 +0000
commit32210b9f8c30e202e275764200315fe26f22f34c (patch)
tree31480b479f4a935c54926df5041e9dee42d7bc66 /oatdump
parentd97a2d17924bc4b19674c6ec7dd494a4dca3d70e (diff)
downloadandroid_art-32210b9f8c30e202e275764200315fe26f22f34c.tar.gz
android_art-32210b9f8c30e202e275764200315fe26f22f34c.tar.bz2
android_art-32210b9f8c30e202e275764200315fe26f22f34c.zip
Generate debug symbols for interpreted methods.
Add .symtab symbols for method bytecodes in the dex section (only if the full --generate-debug-info is enabled for now). Test: m test-art-host-gtest Test: testrunner.py -b --host --optimizing Change-Id: Ie90034c921484bc4ff27c5458da78690b629dd0b
Diffstat (limited to 'oatdump')
-rw-r--r--oatdump/oatdump.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc
index 6668dace89..d2b1c66d72 100644
--- a/oatdump/oatdump.cc
+++ b/oatdump/oatdump.cc
@@ -38,6 +38,7 @@
#include "class_linker-inl.h"
#include "class_linker.h"
#include "compiled_method.h"
+#include "debug/debug_info.h"
#include "debug/elf_debug_writer.h"
#include "debug/method_debug_info.h"
#include "dex/code_item_accessors-inl.h"
@@ -202,8 +203,13 @@ class OatSymbolizer FINAL {
// TODO: Try to symbolize link-time thunks?
// This would require disassembling all methods to find branches outside the method code.
+ // TODO: Add symbols for dex bytecode in the .dex section.
+
+ debug::DebugInfo debug_info{};
+ debug_info.compiled_methods = ArrayRef<const debug::MethodDebugInfo>(method_debug_infos_);
+
debug::WriteDebugInfo(builder_.get(),
- ArrayRef<const debug::MethodDebugInfo>(method_debug_infos_),
+ debug_info,
dwarf::DW_DEBUG_FRAME_FORMAT,
true /* write_oat_patches */);