Set DW_AT_comp_dir for each compile unit in dwarf

The dex file don't contain the full path of the compilation dir so we
set it to a symbolic value ($JAVA_SRC_ROOT) what can be remapped by
the tools reading the dwarf information.

Change-Id: Ia011de14a6b36a29b54b3f3fa290cc3157a0b91d
diff --git a/compiler/elf_writer_debug.cc b/compiler/elf_writer_debug.cc
index 9dc6565..1665ff8 100644
--- a/compiler/elf_writer_debug.cc
+++ b/compiler/elf_writer_debug.cc
@@ -321,6 +321,7 @@
       info_.StartTag(DW_TAG_compile_unit);
       info_.WriteStrp(DW_AT_producer, owner_->WriteString("Android dex2oat"));
       info_.WriteData1(DW_AT_language, DW_LANG_Java);
+      info_.WriteStrp(DW_AT_comp_dir, owner_->WriteString("$JAVA_SRC_ROOT"));
       info_.WriteAddr(DW_AT_low_pc, text_address + compilation_unit.low_pc_);
       info_.WriteUdata(DW_AT_high_pc, compilation_unit.high_pc_ - compilation_unit.low_pc_);
       info_.WriteSecOffset(DW_AT_stmt_list, compilation_unit.debug_line_offset_);