Home
last modified time | relevance | path

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

/system/unwinding/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.cpp32 MapInfo map_info(&prev_map, &prev_map, 1, 2, 3, 4, "map"); in TEST() local
34 EXPECT_EQ(&prev_map, map_info.prev_map()); in TEST()
35 EXPECT_EQ(1UL, map_info.start()); in TEST()
36 EXPECT_EQ(2UL, map_info.end()); in TEST()
37 EXPECT_EQ(3UL, map_info.offset()); in TEST()
38 EXPECT_EQ(4UL, map_info.flags()); in TEST()
39 EXPECT_EQ("map", map_info.name()); in TEST()
40 EXPECT_EQ(INT64_MAX, map_info.load_bias()); in TEST()
41 EXPECT_EQ(0UL, map_info.elf_offset()); in TEST()
42 EXPECT_TRUE(map_info.elf().get() == nullptr); in TEST()
[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 …]
DDexFilesTest.cpp40 void CreateFakeElf(MapInfo* map_info, uint64_t global_offset, uint64_t data_offset, in CreateFakeElf() argument
52 map_info->set_elf(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 …]
DLocalUnwinderTest.cpp60 if (frame.map_info != nullptr) { in ErrorMsg()
61 if (!frame.map_info->name().empty()) { in ErrorMsg()
63 unwind += frame.map_info->name(); in ErrorMsg()
65 unwind += android::base::StringPrintf(" 0x%" PRIx64 "-0x%" PRIx64, frame.map_info->start(), in ErrorMsg()
66 frame.map_info->end()); in ErrorMsg()
68 if (frame.map_info->offset() != 0) { in ErrorMsg()
69 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->set_elf(elf); in CreateFakeElf()
68 MapInfo* map_info = maps_->Get(3); in Init() local
69 ASSERT_TRUE(map_info != nullptr); in Init()
70 CreateFakeElf(map_info, 0x2800, 0x2000, 0x2000, 0x3000); in Init()
72 map_info = maps_->Get(5); in Init()
73 ASSERT_TRUE(map_info != nullptr); in Init()
74 CreateFakeElf(map_info, 0x2800, 0x2000, 0x2000, 0x3000); in Init()
76 map_info = maps_->Get(7); in Init()
77 ASSERT_TRUE(map_info != nullptr); in Init()
[all …]
DRegsTest.cpp172 MapInfo map_info(nullptr, nullptr, 0x1000, 0x2000, 0, 0, ""); in TEST_F() local
174 map_info.set_elf(invalid_elf); in TEST_F()
176 EXPECT_EQ(0x500U, invalid_elf->GetRelPc(0x1500, &map_info)); in TEST_F()
180 EXPECT_EQ(0x600U, invalid_elf->GetRelPc(0x1600, &map_info)); in TEST_F()
183 EXPECT_EQ(0x700U, invalid_elf->GetRelPc(0x1700, &map_info)); in TEST_F()
186 EXPECT_EQ(0x800U, invalid_elf->GetRelPc(0x1800, &map_info)); in TEST_F()
189 EXPECT_EQ(0x900U, invalid_elf->GetRelPc(0x1900, &map_info)); in TEST_F()
192 EXPECT_EQ(0xa00U, invalid_elf->GetRelPc(0x1a00, &map_info)); in TEST_F()
DUnwinderTest.cpp53 MapInfo* map_info = maps_->Find(start); in AddMapInfo() local
55 map_info->set_elf(elf); in AddMapInfo()
57 return map_info; in AddMapInfo()
68 MapInfo* map_info; in SetUpTestSuite() local
97 map_info = AddMapInfo(0x43000, 0x44000, 0x1d000, PROT_READ | PROT_WRITE, "/fake/fake.apk", elf); in SetUpTestSuite()
98 map_info->set_elf_start_offset(0x1d000); in SetUpTestSuite()
102 map_info = in SetUpTestSuite()
104 map_info->set_load_bias(0); in SetUpTestSuite()
114 map_info = AddMapInfo(0xa7000, 0xa8000, 0, PROT_READ | PROT_WRITE | PROT_EXEC, in SetUpTestSuite()
116 map_info->set_elf_offset(0x8000); in SetUpTestSuite()
[all …]
DMapInfoGetBuildIDTest.cpp200 MapInfo map_info(nullptr, nullptr, 0x1000, 0x20000, 0, PROT_READ | PROT_WRITE, in TEST_F() local
202 EXPECT_EQ("6df0590c4920f4c7b9f34fe833f37d54", map_info.GetPrintableBuildID()); in TEST_F()
DElfTest.cpp299 MapInfo map_info(nullptr, nullptr, 0x1000, 0x2000, 0, 0, ""); in TEST_F() local
301 ASSERT_EQ(0x101U, elf.GetRelPc(0x1101, &map_info)); in TEST_F()
304 ASSERT_EQ(0x101U, elf.GetRelPc(0x1101, &map_info)); in TEST_F()
/system/unwinding/libbacktrace/
DUnwindStackMap.cpp72 for (const auto& map_info : *stack_maps_) { in Build()
74 map.start = map_info->start(); in Build()
75 map.end = map_info->end(); in Build()
76 map.offset = map_info->offset(); in Build()
79 map.flags = map_info->flags(); in Build()
80 map.name = map_info->name(); in Build()
95 unwindstack::MapInfo* map_info = stack_maps_->Find(addr); in FillIn() local
96 if (map_info == nullptr) { in FillIn()
99 map->load_bias = map_info->GetLoadBias(process_memory_); in FillIn()
107 unwindstack::MapInfo* map_info = stack_maps_->Get(index); in GetLoadBias() local
[all …]
/system/unwinding/libunwindstack/
DUnwinder.cpp97 FrameData* Unwinder::FillInFrame(MapInfo* map_info, Elf* elf, uint64_t rel_pc, in FillInFrame() argument
107 if (map_info == nullptr) { in FillInFrame()
113 frame->map_name = map_info->name(); in FillInFrame()
114 if (embedded_soname_ && map_info->elf_start_offset() != 0 && !frame->map_name.empty()) { in FillInFrame()
125 frame->map_elf_start_offset = map_info->elf_start_offset(); in FillInFrame()
126 frame->map_exact_offset = map_info->offset(); in FillInFrame()
127 frame->map_start = map_info->start(); in FillInFrame()
128 frame->map_end = map_info->end(); in FillInFrame()
129 frame->map_flags = map_info->flags(); in FillInFrame()
169 MapInfo* map_info = maps_->Find(regs_->pc()); in Unwind() local
[all …]
DLocalUnwinder.cpp84 MapInfo* map_info = maps_->Find(cur_pc); in Unwind() local
85 if (map_info == nullptr) { in Unwind()
89 Elf* elf = map_info->GetElf(process_memory_, arch); in Unwind()
90 uint64_t rel_pc = elf->GetRelPc(cur_pc, map_info); in Unwind()
110 if (num_frames != 0 || !ShouldSkipLibrary(map_info->name())) { in Unwind()
115 frame_info->emplace_back(map_info, cur_pc - pc_adjustment, rel_pc - pc_adjustment, in Unwind()
118 frame_info->emplace_back(map_info, cur_pc - pc_adjustment, rel_pc - pc_adjustment, "", 0); in Unwind()
DMaps.cpp90 auto map_info = in Add() local
92 map_info->set_load_bias(load_bias); in Add()
93 maps_.emplace_back(std::move(map_info)); in Add()
105 for (const auto& map_info : maps_) { in Sort() local
106 map_info->set_prev_map(prev_map); in Sort()
107 map_info->set_prev_real_map(prev_real_map); in Sort()
108 prev_map = map_info.get(); in Sort()
150 MapInfo* map_info = Maps::Find(pc); in Find() local
153 if (map_info == nullptr) { in Find()
158 map_info = Maps::Find(pc); in Find()
[all …]
DElf.cpp104 uint64_t Elf::GetRelPc(uint64_t pc, MapInfo* map_info) { in GetRelPc() argument
105 return pc - map_info->start() + load_bias_ + map_info->elf_offset(); in GetRelPc()
/system/unwinding/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()
259 unwindstack::MapInfo* map_info = maps->Find(sp); in SaveData() local
260 if (map_info != nullptr) { in SaveData()
261 stacks.emplace_back(std::make_pair(sp, map_info->end())); in SaveData()
[all …]
/system/core/debuggerd/libdebuggerd/
Dtombstone.cpp106 unwindstack::MapInfo* map_info = maps->Find(sp); in get_stack_overflow_cause() local
107 if (map_info == nullptr) { in get_stack_overflow_cause()
109 } else if ((map_info->flags() & (PROT_READ | PROT_WRITE)) != (PROT_READ | PROT_WRITE)) { in get_stack_overflow_cause()
111 } else if ((sp - map_info->start()) <= kMaxDifferenceBytes) { in get_stack_overflow_cause()
139 unwindstack::MapInfo* map_info = maps->Find(fault_addr); in dump_probable_cause() local
140 if (map_info != nullptr && map_info->flags() == PROT_EXEC) { in dump_probable_cause()
261 for (auto const& map_info : *maps) { in dump_all_maps()
264 if (addr < map_info->start()) { in dump_all_maps()
268 } else if (addr >= map_info->start() && addr < map_info->end()) { in dump_all_maps()
273 line += get_addr_string(map_info->start()) + '-' + get_addr_string(map_info->end() - 1) + ' '; in dump_all_maps()
[all …]
Dtombstone_proto.cpp102 unwindstack::MapInfo* map_info = maps->Find(sp); in get_stack_overflow_cause() local
103 if (map_info == nullptr) { in get_stack_overflow_cause()
105 } else if ((map_info->flags() & (PROT_READ | PROT_WRITE)) != (PROT_READ | PROT_WRITE)) { in get_stack_overflow_cause()
107 } else if ((sp - map_info->start()) <= kMaxDifferenceBytes) { in get_stack_overflow_cause()
223 unwindstack::MapInfo* map_info = maps->Find(fault_addr); in dump_probable_cause() local
224 if (map_info != nullptr && map_info->flags() == PROT_EXEC) { in dump_probable_cause()
332 unwindstack::MapInfo* map_info = maps->Find(frame.map_start); in fill_in_backtrace_frame() local
333 if (map_info) { in fill_in_backtrace_frame()
334 f->set_build_id(map_info->GetPrintableBuildID()); in fill_in_backtrace_frame()
360 unwindstack::MapInfo* map_info = maps->Find(untag_address(value)); in dump_thread() local
[all …]
/system/unwinding/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.h60 uint64_t GetRelPc(uint64_t pc, MapInfo* map_info);
DUnwinder.h149 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()
36 map_info->SetBuildID(std::string(build_id)); in MockSetBuildID()
/system/unwinding/libunwindstack/benchmarks/
DElfBenchmark.cpp90 for (auto& map_info : maps) { in InitializeBuildId() local
91 if (map_info->offset() == 0 && map_info->GetBuildID() != "") { in InitializeBuildId()
92 *build_id_map_info = map_info.get(); in InitializeBuildId()
/system/unwinding/libunwindstack/tests/fuzz/
DUnwinderComponentCreator.cpp68 const auto& map_info = *--maps->end(); in ElfAddMapInfo() local
69 map_info->set_elf(elf); in ElfAddMapInfo()