summaryrefslogtreecommitdiff
path: root/compiler/debug
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/debug')
-rw-r--r--compiler/debug/elf_debug_writer.cc25
-rw-r--r--compiler/debug/elf_debug_writer.h2
-rw-r--r--compiler/debug/elf_symtab_writer.h2
-rw-r--r--compiler/debug/method_debug_info.h4
4 files changed, 4 insertions, 29 deletions
diff --git a/compiler/debug/elf_debug_writer.cc b/compiler/debug/elf_debug_writer.cc
index 7fa6e146c5..16e73b0824 100644
--- a/compiler/debug/elf_debug_writer.cc
+++ b/compiler/debug/elf_debug_writer.cc
@@ -174,31 +174,6 @@ std::vector<uint8_t> WriteDebugElfFileForClasses(InstructionSet isa,
}
}
-std::vector<MethodDebugInfo> MakeTrampolineInfos(const OatHeader& header) {
- std::map<const char*, uint32_t> trampolines = {
- { "interpreterToInterpreterBridge", header.GetInterpreterToInterpreterBridgeOffset() },
- { "interpreterToCompiledCodeBridge", header.GetInterpreterToCompiledCodeBridgeOffset() },
- { "jniDlsymLookup", header.GetJniDlsymLookupOffset() },
- { "quickGenericJniTrampoline", header.GetQuickGenericJniTrampolineOffset() },
- { "quickImtConflictTrampoline", header.GetQuickImtConflictTrampolineOffset() },
- { "quickResolutionTrampoline", header.GetQuickResolutionTrampolineOffset() },
- { "quickToInterpreterBridge", header.GetQuickToInterpreterBridgeOffset() },
- };
- std::vector<MethodDebugInfo> result;
- for (const auto& it : trampolines) {
- if (it.second != 0) {
- MethodDebugInfo info = MethodDebugInfo();
- info.trampoline_name = it.first;
- info.isa = header.GetInstructionSet();
- info.is_code_address_text_relative = true;
- info.code_address = it.second - header.GetExecutableOffset();
- info.code_size = 0; // The symbol lasts until the next symbol.
- result.push_back(std::move(info));
- }
- }
- return result;
-}
-
// Explicit instantiations
template void WriteDebugInfo<ElfTypes32>(
ElfBuilder<ElfTypes32>* builder,
diff --git a/compiler/debug/elf_debug_writer.h b/compiler/debug/elf_debug_writer.h
index 5d688108e7..6e26ba36c4 100644
--- a/compiler/debug/elf_debug_writer.h
+++ b/compiler/debug/elf_debug_writer.h
@@ -58,8 +58,6 @@ std::vector<uint8_t> WriteDebugElfFileForClasses(
const ArrayRef<mirror::Class*>& types)
REQUIRES_SHARED(Locks::mutator_lock_);
-std::vector<MethodDebugInfo> MakeTrampolineInfos(const OatHeader& oat_header);
-
} // namespace debug
} // namespace art
diff --git a/compiler/debug/elf_symtab_writer.h b/compiler/debug/elf_symtab_writer.h
index af9f091529..abd2699a1f 100644
--- a/compiler/debug/elf_symtab_writer.h
+++ b/compiler/debug/elf_symtab_writer.h
@@ -65,7 +65,7 @@ static void WriteDebugSymbols(ElfBuilder<ElfTypes>* builder,
continue; // Add symbol only for the first instance.
}
size_t name_offset;
- if (info.trampoline_name != nullptr) {
+ if (!info.trampoline_name.empty()) {
name_offset = strtab->Write(info.trampoline_name);
} else {
DCHECK(info.dex_file != nullptr);
diff --git a/compiler/debug/method_debug_info.h b/compiler/debug/method_debug_info.h
index ed1da2c26e..567891087a 100644
--- a/compiler/debug/method_debug_info.h
+++ b/compiler/debug/method_debug_info.h
@@ -17,6 +17,8 @@
#ifndef ART_COMPILER_DEBUG_METHOD_DEBUG_INFO_H_
#define ART_COMPILER_DEBUG_METHOD_DEBUG_INFO_H_
+#include <string>
+
#include "compiled_method.h"
#include "dex_file.h"
@@ -24,7 +26,7 @@ namespace art {
namespace debug {
struct MethodDebugInfo {
- const char* trampoline_name;
+ std::string trampoline_name;
const DexFile* dex_file; // Native methods (trampolines) do not reference dex file.
size_t class_def_index;
uint32_t dex_method_index;