summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
author David Srbecky <dsrbecky@google.com> 2016-03-11 18:19:11 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2016-03-11 18:19:12 +0000
commit2de1e8a52ef8d4b2e033f3404ca9cc970bb5149c (patch)
treef140ba578b933c58367745c5670f6575f8bbfdd7 /compiler
parent9faab4dd50d2bdda12284c6b8d3837943a73b5da (diff)
parent6a6b38fbed22688fac7e061450a8a9c64a685faf (diff)
Merge "Revert "Revert "Allow duplicated methods in different DWARF line tables."""
Diffstat (limited to 'compiler')
-rw-r--r--compiler/debug/elf_debug_line_writer.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/debug/elf_debug_line_writer.h b/compiler/debug/elf_debug_line_writer.h
index 8a4508d984..66e135f395 100644
--- a/compiler/debug/elf_debug_line_writer.h
+++ b/compiler/debug/elf_debug_line_writer.h
@@ -17,6 +17,7 @@
#ifndef ART_COMPILER_DEBUG_ELF_DEBUG_LINE_WRITER_H_
#define ART_COMPILER_DEBUG_ELF_DEBUG_LINE_WRITER_H_
+#include <unordered_set>
#include <vector>
#include "compiled_method.h"
@@ -81,11 +82,14 @@ class ElfDebugLineWriter {
case kX86_64:
break;
}
+ std::unordered_set<uint64_t> seen_addresses(compilation_unit.methods.size());
dwarf::DebugLineOpCodeWriter<> opcodes(is64bit, code_factor_bits_);
for (const MethodDebugInfo* mi : compilation_unit.methods) {
// Ignore function if we have already generated line table for the same address.
// It would confuse the debugger and the DWARF specification forbids it.
- if (mi->deduped) {
+ // We allow the line table for method to be replicated in different compilation unit.
+ // This ensures that each compilation unit contains line table for all its methods.
+ if (!seen_addresses.insert(mi->code_address).second) {
continue;
}