/system/core/libunwindstack/tests/ |
D | MapInfoTest.cpp | 30 MapInfo map_info(&prev_map, 1, 2, 3, 4, "map"); in TEST() local 32 EXPECT_EQ(&prev_map, map_info.prev_map); in TEST() 33 EXPECT_EQ(1UL, map_info.start); in TEST() 34 EXPECT_EQ(2UL, map_info.end); in TEST() 35 EXPECT_EQ(3UL, map_info.offset); in TEST() 36 EXPECT_EQ(4UL, map_info.flags); in TEST() 37 EXPECT_EQ("map", map_info.name); in TEST() 38 EXPECT_EQ(static_cast<uint64_t>(-1), map_info.load_bias); in TEST() 39 EXPECT_EQ(0UL, map_info.elf_offset); in TEST() 40 EXPECT_TRUE(map_info.elf.get() == nullptr); in TEST() [all …]
|
D | MapInfoCreateMemoryTest.cpp | 302 MapInfo* map_info = maps.Find(0x3000); in TEST_F() local 303 ASSERT_TRUE(map_info != nullptr); in TEST_F() 305 std::unique_ptr<Memory> mem(map_info->CreateMemory(process_memory_)); in TEST_F() 307 EXPECT_TRUE(map_info->memory_backed_elf); in TEST_F() 308 EXPECT_EQ(0x4000UL, map_info->elf_offset); in TEST_F() 309 EXPECT_EQ(0x4000UL, map_info->offset); in TEST_F() 310 EXPECT_EQ(0U, map_info->elf_start_offset); in TEST_F() 349 MapInfo* map_info = maps.Find(0x4000); in TEST_F() local 350 ASSERT_TRUE(map_info != nullptr); in TEST_F() 352 std::unique_ptr<Memory> mem(map_info->CreateMemory(process_memory_)); in TEST_F() [all …]
|
D | DexFilesTest.cpp | 39 void CreateFakeElf(MapInfo* map_info) { in CreateFakeElf() argument 47 map_info->elf.reset(elf); in CreateFakeElf() 67 MapInfo* map_info = maps_->Get(kMapGlobalNonReadable); in Init() local 68 ASSERT_TRUE(map_info != nullptr); in Init() 69 CreateFakeElf(map_info); in Init() 72 map_info = maps_->Get(kMapGlobalSetToZero); in Init() 73 ASSERT_TRUE(map_info != nullptr); in Init() 74 CreateFakeElf(map_info); in Init() 77 map_info = maps_->Get(kMapGlobal); in Init() 78 ASSERT_TRUE(map_info != nullptr); in Init() [all …]
|
D | LocalUnwinderTest.cpp | 60 if (frame.map_info != nullptr) { in ErrorMsg() 61 if (!frame.map_info->name.empty()) { in ErrorMsg() 62 unwind += " " + frame.map_info->name; in ErrorMsg() 64 unwind += android::base::StringPrintf(" 0x%" PRIx64 "-0x%" PRIx64, frame.map_info->start, in ErrorMsg() 65 frame.map_info->end); in ErrorMsg() 67 if (frame.map_info->offset != 0) { in ErrorMsg() 68 unwind += android::base::StringPrintf(" offset 0x%" PRIx64, frame.map_info->offset); in ErrorMsg()
|
D | JitDebugTest.cpp | 38 void CreateFakeElf(MapInfo* map_info) { in CreateFakeElf() argument 45 map_info->elf.reset(elf); in CreateFakeElf() 65 MapInfo* map_info = maps_->Get(3); in Init() local 66 ASSERT_TRUE(map_info != nullptr); in Init() 67 CreateFakeElf(map_info); in Init() 69 map_info = maps_->Get(5); in Init() 70 ASSERT_TRUE(map_info != nullptr); in Init() 71 CreateFakeElf(map_info); in Init() 73 map_info = maps_->Get(7); in Init() 74 ASSERT_TRUE(map_info != nullptr); in Init() [all …]
|
D | RegsTest.cpp | 185 MapInfo map_info(nullptr, 0x1000, 0x2000, 0, 0, ""); in TEST_F() local 187 map_info.elf.reset(invalid_elf); in TEST_F() 190 EXPECT_EQ(0x500U, invalid_elf->GetRelPc(regs_arm.pc(), &map_info)); in TEST_F() 195 EXPECT_EQ(0x600U, invalid_elf->GetRelPc(regs_arm64.pc(), &map_info)); in TEST_F() 199 EXPECT_EQ(0x700U, invalid_elf->GetRelPc(regs_x86.pc(), &map_info)); in TEST_F() 203 EXPECT_EQ(0x800U, invalid_elf->GetRelPc(regs_x86_64.pc(), &map_info)); in TEST_F() 207 EXPECT_EQ(0x900U, invalid_elf->GetRelPc(regs_mips.pc(), &map_info)); in TEST_F() 211 EXPECT_EQ(0xa00U, invalid_elf->GetRelPc(regs_mips64.pc(), &map_info)); in TEST_F()
|
D | ElfTest.cpp | 276 MapInfo map_info(nullptr, 0x1000, 0x2000, 0, 0, ""); in TEST_F() local 278 ASSERT_EQ(0x101U, elf.GetRelPc(0x1101, &map_info)); in TEST_F() 281 ASSERT_EQ(0x101U, elf.GetRelPc(0x1101, &map_info)); in TEST_F()
|
D | UnwinderTest.cpp | 52 const auto& map_info = *--maps_->end(); in AddMapInfo() local 53 map_info->elf.reset(elf); in AddMapInfo() 88 MapInfo* map_info = maps_->Find(0x43000); in SetUpTestCase() local 89 ASSERT_TRUE(map_info != nullptr); in SetUpTestCase() 90 map_info->elf_start_offset = 0x1d000; in SetUpTestCase() 869 MapInfo* map_info = maps_->Find(0x53000); in TEST_F() local 870 ASSERT_TRUE(map_info != nullptr); in TEST_F() 871 EXPECT_TRUE(map_info->elf == nullptr); in TEST_F()
|
/system/core/libbacktrace/ |
D | UnwindStackMap.cpp | 58 for (const auto& map_info : *stack_maps_) { in Build() 60 map.start = map_info->start; in Build() 61 map.end = map_info->end; in Build() 62 map.offset = map_info->offset; in Build() 65 map.flags = map_info->flags; in Build() 66 map.name = map_info->name; in Build() 81 unwindstack::MapInfo* map_info = stack_maps_->Find(addr); in FillIn() local 82 if (map_info == nullptr) { in FillIn() 85 map->load_bias = map_info->GetLoadBias(process_memory_); in FillIn() 93 unwindstack::MapInfo* map_info = stack_maps_->Get(index); in GetLoadBias() local [all …]
|
/system/core/libunwindstack/ |
D | Unwinder.cpp | 93 FrameData* Unwinder::FillInFrame(MapInfo* map_info, Elf* elf, uint64_t rel_pc, in FillInFrame() argument 103 if (map_info == nullptr) { in FillInFrame() 109 frame->map_name = map_info->name; in FillInFrame() 110 if (embedded_soname_ && map_info->elf_start_offset != 0 && !frame->map_name.empty()) { in FillInFrame() 117 frame->map_elf_start_offset = map_info->elf_start_offset; in FillInFrame() 118 frame->map_exact_offset = map_info->offset; in FillInFrame() 119 frame->map_start = map_info->start; in FillInFrame() 120 frame->map_end = map_info->end; in FillInFrame() 121 frame->map_flags = map_info->flags; in FillInFrame() 155 MapInfo* map_info = maps_->Find(regs_->pc()); in Unwind() local [all …]
|
D | LocalUnwinder.cpp | 72 MapInfo* map_info = maps_->Find(pc); in GetMapInfo() local 75 if (map_info == nullptr) { in GetMapInfo() 80 map_info = maps_->Find(pc); in GetMapInfo() 85 return map_info; in GetMapInfo() 99 MapInfo* map_info = GetMapInfo(cur_pc); in Unwind() local 100 if (map_info == nullptr) { in Unwind() 104 Elf* elf = map_info->GetElf(process_memory_, arch); in Unwind() 105 uint64_t rel_pc = elf->GetRelPc(cur_pc, map_info); in Unwind() 123 if (num_frames != 0 || !ShouldSkipLibrary(map_info->name)) { in Unwind() 128 frame_info->emplace_back(map_info, cur_pc - pc_adjustment, rel_pc - pc_adjustment, in Unwind() [all …]
|
D | Maps.cpp | 78 auto map_info = in Add() local 81 map_info->load_bias = load_bias; in Add() 82 maps_.emplace_back(std::move(map_info)); in Add() 92 for (const auto& map_info : maps_) { in Sort() local 93 map_info->prev_map = prev_map; in Sort() 94 prev_map = map_info.get(); in Sort()
|
D | Elf.cpp | 104 uint64_t Elf::GetRelPc(uint64_t pc, const MapInfo* map_info) { in GetRelPc() argument 105 return pc - map_info->start + load_bias_ + map_info->elf_offset; in GetRelPc()
|
/system/core/libunwindstack/tools/ |
D | unwind_for_offline.cpp | 204 unwindstack::MapInfo* map_info) { in FillInAndGetMapInfo() argument 205 auto info = &maps_by_start[map_info->start]; in FillInAndGetMapInfo() 206 info->start = map_info->start; in FillInAndGetMapInfo() 207 info->end = map_info->end; in FillInAndGetMapInfo() 208 info->offset = map_info->offset; in FillInAndGetMapInfo() 209 info->name = map_info->name; in FillInAndGetMapInfo() 210 info->flags = map_info->flags; in FillInAndGetMapInfo() 263 unwindstack::MapInfo* map_info = maps->Find(sp); in SaveData() local 264 if (map_info != nullptr) { in SaveData() 265 stacks.emplace_back(std::make_pair(sp, map_info->end)); in SaveData() [all …]
|
/system/core/debuggerd/libdebuggerd/ |
D | tombstone.cpp | 106 unwindstack::MapInfo* map_info = maps->Find(reinterpret_cast<uint64_t>(si->si_addr)); in dump_probable_cause() local 107 if (map_info != nullptr && map_info->flags == PROT_EXEC) { in dump_probable_cause() 177 unwindstack::MapInfo* map_info = maps->Find(stack_data[i]); in dump_stack_segment() local 178 if (map_info != nullptr && !map_info->name.empty()) { in dump_stack_segment() 179 line += " " + map_info->name; in dump_stack_segment() 182 if (map_info->GetFunctionName(stack_data[i], &func_name, &func_offset)) { in dump_stack_segment() 321 for (auto const& map_info : *maps) { in dump_all_maps() 324 if (addr < map_info->start) { in dump_all_maps() 328 } else if (addr >= map_info->start && addr < map_info->end) { in dump_all_maps() 333 line += get_addr_string(map_info->start) + '-' + get_addr_string(map_info->end - 1) + ' '; in dump_all_maps() [all …]
|
/system/core/libunwindstack/include/unwindstack/ |
D | LocalUnwinder.h | 39 LocalFrameData(MapInfo* map_info, uint64_t pc, uint64_t rel_pc, const std::string& function_name, in LocalFrameData() 41 : map_info(map_info), in LocalFrameData() 47 MapInfo* map_info; member
|
D | MapInfo.h | 33 MapInfo(MapInfo* map_info, uint64_t start, uint64_t end, uint64_t offset, uint64_t flags, in MapInfo() 40 prev_map(map_info), in MapInfo() 43 MapInfo(MapInfo* map_info, uint64_t start, uint64_t end, uint64_t offset, uint64_t flags, in MapInfo() 50 prev_map(map_info), in MapInfo()
|
D | Elf.h | 68 uint64_t GetRelPc(uint64_t pc, const MapInfo* map_info);
|
D | Unwinder.h | 123 FrameData* FillInFrame(MapInfo* map_info, Elf* elf, uint64_t rel_pc, uint64_t pc_adjustment);
|
/system/core/debuggerd/libdebuggerd/test/ |
D | UnwinderMock.h | 34 unwindstack::MapInfo* map_info = GetMaps()->Find(offset); in MockSetBuildID() local 35 if (map_info != nullptr) { in MockSetBuildID() 37 map_info->build_id = reinterpret_cast<uintptr_t>(new_build_id); in MockSetBuildID()
|
/system/core/libunwindstack/benchmarks/ |
D | unwind_benchmarks.cpp | 95 for (auto& map_info : maps) { in Initialize() local 96 if (map_info->offset == 0 && map_info->GetBuildID() != "") { in Initialize() 97 *build_id_map_info = map_info.get(); in Initialize()
|