Symbolize native debug information for AOTed methods in boot.oat.
The oatdump symbolizer will produce all DWARF information now,
not just the symtab. This allows us to recover almost all native
debug information after the fact, even for non-debuggable oat files.
The main drawback is that non-debuggable oat files do not have
enough stackmaps to provide reasonable line stepping experience.
We might also be missing inlined methods from backtraces.
Change-Id: I73ff6f43a3a0e5a0907af353f74f04e9b0129590
diff --git a/runtime/oat_quick_method_header.h b/runtime/oat_quick_method_header.h
index 2b7eca2..59c37e4 100644
--- a/runtime/oat_quick_method_header.h
+++ b/runtime/oat_quick_method_header.h
@@ -63,16 +63,24 @@
return gc_map_offset_ == 0 && vmap_table_offset_ != 0;
}
- CodeInfo GetOptimizedCodeInfo() const {
+ const void* GetOptimizedCodeInfoPtr() const {
DCHECK(IsOptimized());
const void* data = reinterpret_cast<const void*>(code_ - vmap_table_offset_);
- return CodeInfo(data);
+ return data;
+ }
+
+ CodeInfo GetOptimizedCodeInfo() const {
+ return CodeInfo(GetOptimizedCodeInfoPtr());
}
const uint8_t* GetCode() const {
return code_;
}
+ uint32_t GetCodeSize() const {
+ return code_size_;
+ }
+
const uint8_t* GetNativeGcMap() const {
return (gc_map_offset_ == 0) ? nullptr : code_ - gc_map_offset_;
}