summaryrefslogtreecommitdiffstats
path: root/compiler/compilers.cc
diff options
context:
space:
mode:
authorTong Shen <endlessroad@google.com>2014-07-30 09:31:22 -0700
committerTong Shen <endlessroad@google.com>2014-07-30 20:19:26 +0000
commit35e1e6ad4b50f1adbe9f93fe467766f042491896 (patch)
tree054e8fe1140fc1144ececa8ad8beda18be9566a2 /compiler/compilers.cc
parent01a0ebb6b96c32879dcad99d515fc0cd8de2a266 (diff)
downloadandroid_art-35e1e6ad4b50f1adbe9f93fe467766f042491896.tar.gz
android_art-35e1e6ad4b50f1adbe9f93fe467766f042491896.tar.bz2
android_art-35e1e6ad4b50f1adbe9f93fe467766f042491896.zip
1. Fix CFI for quick compiled code in x86 & x86_64;
2. Emit CFI in .eh_frame instead of .debug_frame. With CFI, we can correctly unwind past quick generated code. Now gdb should unwind to main() for both x86 & x86_64 host-side ART. Note that it does not work with relocation yet. Testing: 1. art/test/run-test --host --gdb [--64] --no-relocate 005 2. In gdb, run 'b art_quick_invoke_stub', then 'r', then 'c' a few times 3. In gdb, run 'bt'. You should see stack frames down to main() Change-Id: I5350d4097dc3d360a60cb17c94f1d02b99bc58bb
Diffstat (limited to 'compiler/compilers.cc')
-rw-r--r--compiler/compilers.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/compilers.cc b/compiler/compilers.cc
index bac1f12823..250924ad30 100644
--- a/compiler/compilers.cc
+++ b/compiler/compilers.cc
@@ -39,7 +39,7 @@ extern "C" art::CompiledMethod* ArtQuickJniCompileMethod(art::CompilerDriver* dr
const art::DexFile& dex_file);
// Hack for CFI CIE initialization
-extern std::vector<uint8_t>* X86CFIInitialization();
+extern std::vector<uint8_t>* X86CFIInitialization(bool is_x86_64);
void QuickCompiler::Init() const {
ArtInitQuickCompilerContext(GetCompilerDriver());
@@ -129,10 +129,10 @@ Backend* QuickCompiler::GetCodeGenerator(CompilationUnit* cu, void* compilation_
std::vector<uint8_t>* QuickCompiler::GetCallFrameInformationInitialization(
const CompilerDriver& driver) const {
if (driver.GetInstructionSet() == kX86) {
- return X86CFIInitialization();
+ return X86CFIInitialization(false);
}
if (driver.GetInstructionSet() == kX86_64) {
- return X86CFIInitialization();
+ return X86CFIInitialization(true);
}
return nullptr;
}