Fix CFI tests for heap poisoning.

This is partial revert of "Pack JIT mini-debug-infos together."

The code is correct, but it makes heap poisoning tests fail.

Reverting for now, pending further investigation.

Bug: 122259922
Bug: 122379755
Test: ART_HEAP_POISONING=true ART_USE_READ_BARRIER=true ./art/test.py -b -r -t 137
Change-Id: Ic15e150e0c205439be7753c125e243f77e380cae
diff --git a/compiler/debug/elf_debug_frame_writer.h b/compiler/debug/elf_debug_frame_writer.h
index e0116c6..27b70c8 100644
--- a/compiler/debug/elf_debug_frame_writer.h
+++ b/compiler/debug/elf_debug_frame_writer.h
@@ -182,7 +182,7 @@
   std::vector<const MethodDebugInfo*> sorted_method_infos;
   sorted_method_infos.reserve(method_infos.size());
   for (size_t i = 0; i < method_infos.size(); i++) {
-    if (!method_infos[i].deduped) {
+    if (!method_infos[i].cfi.empty() && !method_infos[i].deduped) {
       sorted_method_infos.push_back(&method_infos[i]);
     }
   }
@@ -222,6 +222,7 @@
     buffer.clear();
     for (const MethodDebugInfo* mi : sorted_method_infos) {
       DCHECK(!mi->deduped);
+      DCHECK(!mi->cfi.empty());
       const Elf_Addr code_address = mi->code_address +
           (mi->is_code_address_text_relative ? builder->GetText()->GetAddress() : 0);
       if (format == dwarf::DW_EH_FRAME_FORMAT) {
diff --git a/compiler/debug/elf_debug_writer.cc b/compiler/debug/elf_debug_writer.cc
index 56d773f..8fbb8cb 100644
--- a/compiler/debug/elf_debug_writer.cc
+++ b/compiler/debug/elf_debug_writer.cc
@@ -226,7 +226,8 @@
           num_cfis++;
         });
     DCHECK_EQ(num_syms, 1u);
-    DCHECK_EQ(num_cfis, 1u);
+    // CFI might be missing. TODO: Ensure we have CFI for all methods.
+    DCHECK_LE(num_cfis, 1u);
   }
   return buffer;
 }