summaryrefslogtreecommitdiffstats
path: root/compiler/compiled_method.h
diff options
context:
space:
mode:
authorMark Mendell <mark.p.mendell@intel.com>2014-02-10 16:14:35 -0800
committerIan Rogers <irogers@google.com>2014-03-02 11:57:10 -0800
commitae9fd93c39a341e2dffe15c61cc7d9e841fa92c4 (patch)
treee5f70dc307945fd510660ebde1fd259aecdf66a1 /compiler/compiled_method.h
parent9fab32265f35c808b216210a8d5bebd931279041 (diff)
downloadart-ae9fd93c39a341e2dffe15c61cc7d9e841fa92c4.zip
art-ae9fd93c39a341e2dffe15c61cc7d9e841fa92c4.tar.gz
art-ae9fd93c39a341e2dffe15c61cc7d9e841fa92c4.tar.bz2
Tell GDB about Quick ART generated code
This is actually a lot of work. To do this, we need: .debug_info .debug_abbrev .debug_frame .debug_str These are generated into the OAT file by OatWriter and ElfWriterQuick. Since the Quick ART runtime doesn't use dlopen to load the OAT files, GDB can't find this information. Use the alternate GDB JIT interface, which can be invoked at runtime. To use this interface, an ELF image needs to be built in memory. Read the information from the OAT file, fixup the addresses to point to the real locations, add a symbol table to hold the .text symbol, and then let GDB know about the information, which will be read from the runtime address space. This is quite primitive now, and could be cleaned up considerably. It probably needs symbol table entries for the methods, and descriptions of parameters and return types. Currently only supported for X86. This defaults to enabled for debug builds. Added dexoat --gen-gdb-info and --no-gen-gdb-info flags to override. Change-Id: I4d18b2370f6dfaa00c8cc1925f10717be3bd1a62 Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
Diffstat (limited to 'compiler/compiled_method.h')
-rw-r--r--compiler/compiled_method.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/compiled_method.h b/compiler/compiled_method.h
index 6112305..90ae6ee 100644
--- a/compiler/compiled_method.h
+++ b/compiler/compiled_method.h
@@ -110,7 +110,8 @@ class CompiledMethod : public CompiledCode {
const uint32_t fp_spill_mask,
const std::vector<uint8_t>& mapping_table,
const std::vector<uint8_t>& vmap_table,
- const std::vector<uint8_t>& native_gc_map);
+ const std::vector<uint8_t>& native_gc_map,
+ const std::vector<uint8_t>* cfi_info);
// Constructs a CompiledMethod for the QuickJniCompiler.
CompiledMethod(CompilerDriver& driver,
@@ -157,6 +158,10 @@ class CompiledMethod : public CompiledCode {
return *gc_map_;
}
+ const std::vector<uint8_t>* GetCFIInfo() const {
+ return cfi_info_;
+ }
+
private:
// For quick code, the size of the activation used by the code.
const size_t frame_size_in_bytes_;
@@ -172,6 +177,8 @@ class CompiledMethod : public CompiledCode {
// For quick code, a map keyed by native PC indices to bitmaps describing what dalvik registers
// are live. For portable code, the key is a dalvik PC.
std::vector<uint8_t>* gc_map_;
+ // For quick code, a FDE entry for the debug_frame section.
+ std::vector<uint8_t>* cfi_info_;
};
} // namespace art