Prune useless entries from dex to pc map

Step one of the change.  Limit entries in the table to native
code safepoint locations (which generally are the return PC
addresses of any call that might trigger a stack walk and the
start addresses of all catch blocks).

Previously, the mapping_table described ranges.  No longer.  Any
native PC located within compiled Dex code that is found in a
stack walk should have an exact match in the table.

In future CLs we'll add data compression (probably uLeb128) and
may add inflation on first use to a faster access map (instead of
the current linear search).

Note that this CL introduces somewhat of a regression in the
capabilities of oat-dump.  Because the mapping table no longer
associates each native intruction with its Dex counter-part, the
native code disassembly no longer includes interspersed Dex
disassembly.

Note also that as of this CL, the compiler is adopting the 100-char
line length limit used in the rest of Art.  The 80-char limit
should still be used in any code that we expect to upstream to
llvm.

Change-Id: I1beca4d57c41e8161bf746bc62abbce08d5bcb4d
diff --git a/src/object.cc b/src/object.cc
index fc89841..b131517 100644
--- a/src/object.cc
+++ b/src/object.cc
@@ -480,22 +480,14 @@
   }
   size_t mapping_table_length = GetMappingTableLength();
   uint32_t sought_offset = pc - reinterpret_cast<uintptr_t>(GetOatCode(this));
-  uint32_t best_offset = 0;
-  uint32_t best_dex_offset = 0;
   for (size_t i = 0; i < mapping_table_length; i += 2) {
-    uint32_t map_offset = mapping_table[i];
-    uint32_t map_dex_offset = mapping_table[i + 1];
-    if (map_offset == sought_offset) {
-      best_offset = map_offset;
-      best_dex_offset = map_dex_offset;
-      break;
-    }
-    if (map_offset < sought_offset && map_offset > best_offset) {
-      best_offset = map_offset;
-      best_dex_offset = map_dex_offset;
+    if (mapping_table[i] == sought_offset) {
+      return mapping_table[i + 1];
     }
   }
-  return best_dex_offset;
+  LOG(FATAL) << "Failed to find Dex offset for PC offset 0x" << std::hex << sought_offset
+             << " in " << PrettyMethod(this);
+  return DexFile::kDexNoIndex;
 #else
   // Compiler LLVM doesn't use the machine pc, we just use dex pc instead.
   return static_cast<uint32_t>(pc);