summaryrefslogtreecommitdiff
path: root/compiler/dex/quick/codegen_util.cc
diff options
context:
space:
mode:
author David Srbecky <dsrbecky@google.com> 2015-04-07 20:21:06 +0100
committer David Srbecky <dsrbecky@google.com> 2015-04-08 15:08:07 +0100
commit1109fb3cacc8bb667979780c2b4b12ce5bb64549 (patch)
tree00b38dbb7d7cf173bb376ed0b87d015dc09a6559 /compiler/dex/quick/codegen_util.cc
parentcde8e5da3e774a2494b051043130c0495eca09ef (diff)
Implement CFI for Quick.
CFI is necessary for stack unwinding in gdb, lldb, and libunwind. Change-Id: Ic3b84c9dc91c4bae80e27cda02190f3274e95ae8
Diffstat (limited to 'compiler/dex/quick/codegen_util.cc')
-rw-r--r--compiler/dex/quick/codegen_util.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/dex/quick/codegen_util.cc b/compiler/dex/quick/codegen_util.cc
index 232a2286e2..ff5f735255 100644
--- a/compiler/dex/quick/codegen_util.cc
+++ b/compiler/dex/quick/codegen_util.cc
@@ -1072,6 +1072,9 @@ Mir2Lir::Mir2Lir(CompilationUnit* cu, MIRGraph* mir_graph, ArenaAllocator* arena
dex_cache_arrays_layout_(cu->compiler_driver->GetDexCacheArraysLayout(cu->dex_file)),
pc_rel_temp_(nullptr),
dex_cache_arrays_min_offset_(std::numeric_limits<uint32_t>::max()),
+ cfi_(&last_lir_insn_,
+ cu->compiler_driver->GetCompilerOptions().GetGenerateGDBInformation(),
+ arena),
in_to_reg_storage_mapping_(arena) {
switch_tables_.reserve(4);
fill_array_data_.reserve(4);
@@ -1164,7 +1167,7 @@ CompiledMethod* Mir2Lir::GetCompiledMethod() {
ArrayRef<const uint8_t>(encoded_mapping_table_),
ArrayRef<const uint8_t>(vmap_encoder.GetData()),
ArrayRef<const uint8_t>(native_gc_map_),
- ArrayRef<const uint8_t>(),
+ ArrayRef<const uint8_t>(*cfi_.Patch(code_buffer_.size())),
ArrayRef<const LinkerPatch>(patches_));
}