diff options
| author | 2016-03-11 14:35:45 +0000 | |
|---|---|---|
| committer | 2016-03-11 18:17:56 +0000 | |
| commit | 6a6b38fbed22688fac7e061450a8a9c64a685faf (patch) | |
| tree | 79c27dd0575f8d7fac2b9b0c630577701ec1c7a9 | |
| parent | 6030b15ce83ac2a9fb78cd9d137b6f4b441e6417 (diff) | |
Revert "Revert "Allow duplicated methods in different DWARF line tables.""
This reverts commit 8862fac4a0b97d827d2808146d2d79b8d799b998.
Change-Id: I4d5629df4580b7ac08a5cb04924c56eecad3ad25
| -rw-r--r-- | compiler/debug/elf_debug_line_writer.h | 6 |
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 9875c71080..3fe8c3b085 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; } |