diff options
author | Mark Mendell <mark.p.mendell@intel.com> | 2014-02-10 16:14:35 -0800 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2014-03-02 11:57:10 -0800 |
commit | ae9fd93c39a341e2dffe15c61cc7d9e841fa92c4 (patch) | |
tree | e5f70dc307945fd510660ebde1fd259aecdf66a1 /compiler/dex/quick/x86/codegen_x86.h | |
parent | 9fab32265f35c808b216210a8d5bebd931279041 (diff) | |
download | android_art-ae9fd93c39a341e2dffe15c61cc7d9e841fa92c4.tar.gz android_art-ae9fd93c39a341e2dffe15c61cc7d9e841fa92c4.tar.bz2 android_art-ae9fd93c39a341e2dffe15c61cc7d9e841fa92c4.zip |
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/dex/quick/x86/codegen_x86.h')
-rw-r--r-- | compiler/dex/quick/x86/codegen_x86.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/compiler/dex/quick/x86/codegen_x86.h b/compiler/dex/quick/x86/codegen_x86.h index 421d51e4fd..c97d0e6f4d 100644 --- a/compiler/dex/quick/x86/codegen_x86.h +++ b/compiler/dex/quick/x86/codegen_x86.h @@ -302,6 +302,18 @@ class X86Mir2Lir : public Mir2Lir { */ void InstallLiteralPools(); + /* + * @brief Generate the debug_frame CFI information. + * @returns pointer to vector containing CFE information + */ + static std::vector<uint8_t>* ReturnCommonCallFrameInformation(); + + /* + * @brief Generate the debug_frame FDE information. + * @returns pointer to vector containing CFE information + */ + std::vector<uint8_t>* ReturnCallFrameInformation(); + private: void EmitPrefix(const X86EncodingMap* entry); void EmitOpcode(const X86EncodingMap* entry); @@ -549,6 +561,12 @@ class X86Mir2Lir : public Mir2Lir { // Instructions needing patching with PC relative code addresses. GrowableArray<LIR*> call_method_insns_; + + // Prologue decrement of stack pointer. + LIR* stack_decrement_; + + // Epilogue increment of stack pointer. + LIR* stack_increment_; }; } // namespace art |