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>
diff --git a/compiler/compiler_backend.h b/compiler/compiler_backend.h
index 51fb29a..b473806 100644
--- a/compiler/compiler_backend.h
+++ b/compiler/compiler_backend.h
@@ -93,6 +93,19 @@
 
   virtual ~CompilerBackend() {}
 
+  /*
+   * @brief Generate and return Dwarf CFI initialization, if supported by the
+   * backend.
+   * @param driver CompilerDriver for this compile.
+   * @returns nullptr if not supported by backend or a vector of bytes for CFI DWARF
+   * information.
+   * @note This is used for backtrace information in generated code.
+   */
+  virtual std::vector<uint8_t>* GetCallFrameInformationInitialization(const CompilerDriver& driver)
+      const {
+    return nullptr;
+  }
+
  private:
   const uint64_t maximum_compilation_time_before_warning_;