Home
last modified time | relevance | path

Searched refs:map_info (Results 1 – 22 of 22) sorted by relevance

/system/core/libunwindstack/tests/
DLocalUpdatableMapsTest.cpp59 MapInfo* map_info = maps_.Get(0); in SetUp() local
60 ASSERT_TRUE(map_info != nullptr); in SetUp()
61 EXPECT_EQ(0x3000U, map_info->start); in SetUp()
62 EXPECT_EQ(0x4000U, map_info->end); in SetUp()
63 EXPECT_EQ(0U, map_info->offset); in SetUp()
64 EXPECT_EQ(PROT_READ | PROT_EXEC, map_info->flags); in SetUp()
65 EXPECT_TRUE(map_info->name.empty()); in SetUp()
67 map_info = maps_.Get(1); in SetUp()
68 ASSERT_TRUE(map_info != nullptr); in SetUp()
69 EXPECT_EQ(0x8000U, map_info->start); in SetUp()
[all …]
DMapInfoTest.cpp30 MapInfo map_info(&prev_map, &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(INT64_MAX, 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 …]
DDexFilesTest.cpp39 void CreateFakeElf(MapInfo* map_info, uint64_t global_offset, uint64_t data_offset, in CreateFakeElf() argument
51 map_info->elf.reset(elf); in CreateFakeElf()
75 MapInfo* map_info = maps_->Get(kMapGlobalNonReadable); in Init() local
76 ASSERT_TRUE(map_info != nullptr); in Init()
77 CreateFakeElf(map_info, 0x2800, 0x2000, 0x2000, 0x3000); in Init()
80 map_info = maps_->Get(kMapGlobalSetToZero); in Init()
81 ASSERT_TRUE(map_info != nullptr); in Init()
82 CreateFakeElf(map_info, 0x2800, 0x2000, 0x2000, 0x3000); in Init()
85 map_info = maps_->Get(kMapGlobal); in Init()
86 ASSERT_TRUE(map_info != nullptr); in Init()
[all …]
DMapInfoCreateMemoryTest.cpp297 MapInfo* map_info = maps.Find(0x3000); in TEST_F() local
298 ASSERT_TRUE(map_info != nullptr); in TEST_F()
300 std::unique_ptr<Memory> mem(map_info->CreateMemory(process_memory_)); in TEST_F()
302 EXPECT_TRUE(map_info->memory_backed_elf); in TEST_F()
303 EXPECT_EQ(0x4000UL, map_info->elf_offset); in TEST_F()
304 EXPECT_EQ(0x4000UL, map_info->offset); in TEST_F()
305 EXPECT_EQ(0U, map_info->elf_start_offset); in TEST_F()
344 MapInfo* map_info = maps.Find(0x4000); in TEST_F() local
345 ASSERT_TRUE(map_info != nullptr); in TEST_F()
347 std::unique_ptr<Memory> mem(map_info->CreateMemory(process_memory_)); in TEST_F()
[all …]
DLocalUnwinderTest.cpp60 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()
DJitDebugTest.cpp38 void CreateFakeElf(MapInfo* map_info, uint64_t global_offset, uint64_t data_offset, in CreateFakeElf() argument
49 map_info->elf.reset(elf); in CreateFakeElf()
69 MapInfo* map_info = maps_->Get(3); in Init() local
70 ASSERT_TRUE(map_info != nullptr); in Init()
71 CreateFakeElf(map_info, 0x2800, 0x2000, 0x2000, 0x3000); in Init()
73 map_info = maps_->Get(5); in Init()
74 ASSERT_TRUE(map_info != nullptr); in Init()
75 CreateFakeElf(map_info, 0x2800, 0x2000, 0x2000, 0x3000); in Init()
77 map_info = maps_->Get(7); in Init()
78 ASSERT_TRUE(map_info != nullptr); in Init()
[all …]
DRegsTest.cpp185 MapInfo map_info(nullptr, 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()
DElfTest.cpp278 MapInfo map_info(nullptr, nullptr, 0x1000, 0x2000, 0, 0, ""); in TEST_F() local
280 ASSERT_EQ(0x101U, elf.GetRelPc(0x1101, &map_info)); in TEST_F()
283 ASSERT_EQ(0x101U, elf.GetRelPc(0x1101, &map_info)); in TEST_F()
DUnwinderTest.cpp52 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 SetUpTestSuite() local
89 ASSERT_TRUE(map_info != nullptr); in SetUpTestSuite()
90 map_info->elf_start_offset = 0x1d000; in SetUpTestSuite()
873 MapInfo* map_info = maps_->Find(0x53000); in TEST_F() local
874 ASSERT_TRUE(map_info != nullptr); in TEST_F()
875 EXPECT_TRUE(map_info->elf == nullptr); in TEST_F()
/system/core/libbacktrace/
DUnwindStackMap.cpp58 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/
DUnwinder.cpp95 FrameData* Unwinder::FillInFrame(MapInfo* map_info, Elf* elf, uint64_t rel_pc, in FillInFrame() argument
105 if (map_info == nullptr) { in FillInFrame()
111 frame->map_name = map_info->name; in FillInFrame()
112 if (embedded_soname_ && map_info->elf_start_offset != 0 && !frame->map_name.empty()) { in FillInFrame()
119 frame->map_elf_start_offset = map_info->elf_start_offset; in FillInFrame()
120 frame->map_exact_offset = map_info->offset; in FillInFrame()
121 frame->map_start = map_info->start; in FillInFrame()
122 frame->map_end = map_info->end; in FillInFrame()
123 frame->map_flags = map_info->flags; in FillInFrame()
157 MapInfo* map_info = maps_->Find(regs_->pc()); in Unwind() local
[all …]
DLocalUnwinder.cpp72 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 …]
DMaps.cpp88 auto map_info = in Add() local
90 map_info->load_bias = load_bias; in Add()
91 maps_.emplace_back(std::move(map_info)); in Add()
102 for (const auto& map_info : maps_) { in Sort() local
103 map_info->prev_map = prev_map; in Sort()
104 map_info->prev_real_map = prev_real_map; in Sort()
105 prev_map = map_info.get(); in Sort()
DElf.cpp104 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/
Dunwind_for_offline.cpp204 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/
Dtombstone.cpp109 unwindstack::MapInfo* map_info = maps->Find(sp); in get_stack_overflow_cause() local
110 if (map_info == nullptr) { in get_stack_overflow_cause()
112 } else if ((map_info->flags & (PROT_READ | PROT_WRITE)) != (PROT_READ | PROT_WRITE)) { in get_stack_overflow_cause()
114 } else if ((sp - map_info->start) <= kMaxDifferenceBytes) { in get_stack_overflow_cause()
142 unwindstack::MapInfo* map_info = maps->Find(fault_addr); in dump_probable_cause() local
143 if (map_info != nullptr && map_info->flags == PROT_EXEC) { in dump_probable_cause()
259 for (auto const& map_info : *maps) { in dump_all_maps()
262 if (addr < map_info->start) { in dump_all_maps()
266 } else if (addr >= map_info->start && addr < map_info->end) { in dump_all_maps()
271 line += get_addr_string(map_info->start) + '-' + get_addr_string(map_info->end - 1) + ' '; in dump_all_maps()
[all …]
Dgwp_asan.cpp170 unwindstack::MapInfo* map_info = maps->Find(pc); in BuildFrame() local
171 if (!map_info) { in BuildFrame()
177 map_info->GetElf(unwinder->GetProcessMemory(), unwindstack::Regs::CurrentArch()); in BuildFrame()
179 uint64_t relative_pc = elf->GetRelPc(pc, map_info); in BuildFrame()
203 frame.map_name = map_info->name; in BuildFrame()
204 frame.map_elf_start_offset = map_info->elf_start_offset; in BuildFrame()
205 frame.map_exact_offset = map_info->offset; in BuildFrame()
206 frame.map_start = map_info->start; in BuildFrame()
207 frame.map_end = map_info->end; in BuildFrame()
208 frame.map_flags = map_info->flags; in BuildFrame()
/system/core/libunwindstack/include/unwindstack/
DLocalUnwinder.h39 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
DElf.h68 uint64_t GetRelPc(uint64_t pc, const MapInfo* map_info);
DUnwinder.h121 FrameData* FillInFrame(MapInfo* map_info, Elf* elf, uint64_t rel_pc, uint64_t pc_adjustment);
/system/core/debuggerd/libdebuggerd/test/
DUnwinderMock.h34 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/
Dunwind_benchmarks.cpp95 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()