Allow multiple native debug entries with same address.

We create packed entries which hold multiple methods and have
address aligned to 64k block that contains those methods.

If there is no method at the start of the block, it is possible
the new method will be JITed at that 64k-aligned address.

Test: test.py -b -r -t 137
Bug: 121363337
Change-Id: I2561b207f99e91e03f4709df5f318879c884a829
diff --git a/runtime/jit/debugger_interface.cc b/runtime/jit/debugger_interface.cc
index 7aa6ddf..99f9387 100644
--- a/runtime/jit/debugger_interface.cc
+++ b/runtime/jit/debugger_interface.cc
@@ -274,7 +274,7 @@
 }
 
 // Mapping from handle to entry. Used to manage life-time of the entries.
-static std::map<const void*, JITCodeEntry*> g_jit_debug_entries GUARDED_BY(g_jit_debug_lock);
+static std::multimap<const void*, JITCodeEntry*> g_jit_debug_entries GUARDED_BY(g_jit_debug_lock);
 
 // Number of entries added since last packing.  Used to pack entries in bulk.
 static size_t g_jit_num_unpacked_entries GUARDED_BY(g_jit_debug_lock) = 0;
@@ -383,8 +383,7 @@
   // (this only happens when --generate-debug-info flag is enabled for the purpose
   // of being debugged with gdb; it does not happen for debuggable apps by default).
   if (code_ptr != nullptr) {
-    bool ok = g_jit_debug_entries.emplace(code_ptr, entry).second;
-    DCHECK(ok) << "Native debug entry already exists for " << std::hex << code_ptr;
+    g_jit_debug_entries.emplace(code_ptr, entry);
     // Count how many entries we have added since the last mini-debug-info packing.
     // We avoid g_jit_debug_entries.size() here because it can shrink during packing.
     g_jit_num_unpacked_entries++;