• Home
  • Raw
  • Download

Lines Matching refs:elf

111   Elf elf(memory_);  in TEST_F()  local
113 ASSERT_FALSE(elf.Init()); in TEST_F()
114 ASSERT_FALSE(elf.valid()); in TEST_F()
118 Elf elf(memory_); in TEST_F() local
125 ASSERT_FALSE(elf.Init()); in TEST_F()
126 ASSERT_FALSE(elf.valid()); in TEST_F()
127 ASSERT_TRUE(elf.interface() == nullptr); in TEST_F()
129 ASSERT_EQ("", elf.GetSoname()); in TEST_F()
133 ASSERT_FALSE(elf.GetFunctionName(0, &name, &func_offset)); in TEST_F()
135 ASSERT_FALSE(elf.StepIfSignalHandler(0, nullptr, nullptr)); in TEST_F()
136 EXPECT_EQ(ERROR_INVALID_ELF, elf.GetLastErrorCode()); in TEST_F()
139 ASSERT_FALSE(elf.Step(0, nullptr, nullptr, &finished)); in TEST_F()
140 EXPECT_EQ(ERROR_INVALID_ELF, elf.GetLastErrorCode()); in TEST_F()
144 Elf elf(memory_); in TEST_F() local
149 ASSERT_FALSE(elf.Init()); in TEST_F()
157 Elf elf(memory_); in TEST_F() local
162 ASSERT_FALSE(elf.Init()); in TEST_F()
170 Elf elf(memory_); in TEST_F() local
174 ASSERT_TRUE(elf.Init()); in TEST_F()
175 ASSERT_TRUE(elf.valid()); in TEST_F()
176 ASSERT_EQ(static_cast<uint32_t>(EM_ARM), elf.machine_type()); in TEST_F()
177 ASSERT_EQ(ELFCLASS32, elf.class_type()); in TEST_F()
178 ASSERT_TRUE(elf.interface() != nullptr); in TEST_F()
182 Elf elf(memory_); in TEST_F() local
186 ASSERT_TRUE(elf.Init()); in TEST_F()
187 ASSERT_TRUE(elf.valid()); in TEST_F()
188 ASSERT_EQ(static_cast<uint32_t>(EM_MIPS), elf.machine_type()); in TEST_F()
189 ASSERT_EQ(ELFCLASS32, elf.class_type()); in TEST_F()
190 ASSERT_TRUE(elf.interface() != nullptr); in TEST_F()
194 Elf elf(memory_); in TEST_F() local
198 ASSERT_TRUE(elf.Init()); in TEST_F()
199 ASSERT_TRUE(elf.valid()); in TEST_F()
200 ASSERT_EQ(static_cast<uint32_t>(EM_386), elf.machine_type()); in TEST_F()
201 ASSERT_EQ(ELFCLASS32, elf.class_type()); in TEST_F()
202 ASSERT_TRUE(elf.interface() != nullptr); in TEST_F()
206 Elf elf(memory_); in TEST_F() local
210 ASSERT_TRUE(elf.Init()); in TEST_F()
211 ASSERT_TRUE(elf.valid()); in TEST_F()
212 ASSERT_EQ(static_cast<uint32_t>(EM_AARCH64), elf.machine_type()); in TEST_F()
213 ASSERT_EQ(ELFCLASS64, elf.class_type()); in TEST_F()
214 ASSERT_TRUE(elf.interface() != nullptr); in TEST_F()
218 Elf elf(memory_); in TEST_F() local
222 ASSERT_TRUE(elf.Init()); in TEST_F()
223 ASSERT_TRUE(elf.valid()); in TEST_F()
224 ASSERT_EQ(static_cast<uint32_t>(EM_X86_64), elf.machine_type()); in TEST_F()
225 ASSERT_EQ(ELFCLASS64, elf.class_type()); in TEST_F()
226 ASSERT_TRUE(elf.interface() != nullptr); in TEST_F()
230 Elf elf(memory_); in TEST_F() local
234 ASSERT_TRUE(elf.Init()); in TEST_F()
235 ASSERT_TRUE(elf.valid()); in TEST_F()
236 ASSERT_EQ(static_cast<uint32_t>(EM_MIPS), elf.machine_type()); in TEST_F()
237 ASSERT_EQ(ELFCLASS64, elf.class_type()); in TEST_F()
238 ASSERT_TRUE(elf.interface() != nullptr); in TEST_F()
247 Elf elf(memory_); in TEST_F() local
248 ASSERT_TRUE(elf.Init()); in TEST_F()
249 ASSERT_TRUE(elf.interface() != nullptr); in TEST_F()
250 ASSERT_TRUE(elf.gnu_debugdata_interface() != nullptr); in TEST_F()
251 EXPECT_EQ(0x1acU, elf.interface()->gnu_debugdata_offset()); in TEST_F()
252 EXPECT_EQ(0x8cU, elf.interface()->gnu_debugdata_size()); in TEST_F()
261 Elf elf(memory_); in TEST_F() local
262 ASSERT_TRUE(elf.Init()); in TEST_F()
263 ASSERT_TRUE(elf.interface() != nullptr); in TEST_F()
264 ASSERT_TRUE(elf.gnu_debugdata_interface() != nullptr); in TEST_F()
265 EXPECT_EQ(0x200U, elf.interface()->gnu_debugdata_offset()); in TEST_F()
266 EXPECT_EQ(0x90U, elf.interface()->gnu_debugdata_size()); in TEST_F()
270 ElfFake elf(memory_); in TEST_F() local
273 elf.FakeSetInterface(interface); in TEST_F()
275 elf.FakeSetValid(true); in TEST_F()
278 ASSERT_EQ(0x101U, elf.GetRelPc(0x1101, &map_info)); in TEST_F()
280 elf.FakeSetValid(false); in TEST_F()
281 ASSERT_EQ(0x101U, elf.GetRelPc(0x1101, &map_info)); in TEST_F()
285 ElfFake elf(memory_); in TEST_F() local
292 elf.FakeSetInterface(interface); in TEST_F()
301 elf.FakeSetValid(true); in TEST_F()
302 ASSERT_TRUE(elf.StepIfSignalHandler(0x3000, &regs, &process_memory)); in TEST_F()
303 EXPECT_EQ(ERROR_NONE, elf.GetLastErrorCode()); in TEST_F()
329 ElfFake elf(memory_); in TEST_F() local
330 elf.FakeSetValid(true); in TEST_F()
335 elf.FakeSetInterface(interface); in TEST_F()
342 ASSERT_TRUE(elf.Step(0x1000, &regs, &process_memory, &finished)); in TEST_F()
346 ElfFake elf(memory_); in TEST_F() local
347 elf.FakeSetValid(false); in TEST_F()
351 ASSERT_FALSE(elf.GetGlobalVariable(global, &offset)); in TEST_F()
355 ElfFake elf(memory_); in TEST_F() local
356 elf.FakeSetValid(true); in TEST_F()
359 elf.FakeSetInterface(interface); in TEST_F()
365 ASSERT_FALSE(elf.GetGlobalVariable(global, &offset)); in TEST_F()
369 ElfFake elf(memory_); in TEST_F() local
370 elf.FakeSetValid(true); in TEST_F()
371 elf.FakeSetLoadBias(0x1000); in TEST_F()
374 elf.FakeSetInterface(interface); in TEST_F()
381 ASSERT_FALSE(elf.GetGlobalVariable(global, &offset)); in TEST_F()
385 ElfFake elf(memory_); in TEST_F() local
386 elf.FakeSetValid(true); in TEST_F()
387 elf.FakeSetLoadBias(0x100); in TEST_F()
390 elf.FakeSetInterface(interface); in TEST_F()
397 ASSERT_TRUE(elf.GetGlobalVariable(global, &offset)); in TEST_F()
402 ElfFake elf(memory_); in TEST_F() local
403 elf.FakeSetValid(true); in TEST_F()
406 elf.FakeSetInterface(interface); in TEST_F()
409 elf.FakeSetGnuDebugdataInterface(gnu_interface); in TEST_F()
418 ASSERT_TRUE(elf.GetGlobalVariable(global, &offset)); in TEST_F()
423 ElfFake elf(memory_); in TEST_F() local
424 elf.FakeSetValid(true); in TEST_F()
427 elf.FakeSetInterface(interface); in TEST_F()
434 ASSERT_TRUE(elf.GetGlobalVariable(global, &offset)); in TEST_F()
439 ElfFake elf(memory_); in TEST_F() local
440 elf.FakeSetValid(true); in TEST_F()
446 elf.FakeSetInterface(interface); in TEST_F()
453 ASSERT_TRUE(elf.GetGlobalVariable(global, &offset)); in TEST_F()
458 ElfFake elf(memory_); in TEST_F() local
459 elf.FakeSetValid(true); in TEST_F()
465 elf.FakeSetInterface(interface); in TEST_F()
472 ASSERT_TRUE(elf.GetGlobalVariable(global, &offset)); in TEST_F()
477 ElfFake elf(memory_); in TEST_F() local
478 elf.FakeSetValid(false); in TEST_F()
480 EXPECT_FALSE(elf.IsValidPc(0x100)); in TEST_F()
481 EXPECT_FALSE(elf.IsValidPc(0x200)); in TEST_F()
485 ElfFake elf(memory_); in TEST_F() local
486 elf.FakeSetValid(true); in TEST_F()
489 elf.FakeSetInterface(interface); in TEST_F()
493 EXPECT_TRUE(elf.IsValidPc(0x1500)); in TEST_F()
497 ElfFake elf(memory_); in TEST_F() local
498 elf.FakeSetValid(true); in TEST_F()
501 elf.FakeSetInterface(interface); in TEST_F()
503 elf.FakeSetGnuDebugdataInterface(gnu_interface); in TEST_F()
508 EXPECT_TRUE(elf.IsValidPc(0x1500)); in TEST_F()
512 ElfFake elf(memory_); in TEST_F() local
513 elf.FakeSetValid(false); in TEST_F()
516 elf.GetLastError(&error); in TEST_F()
522 ElfFake elf(memory_); in TEST_F() local
523 elf.FakeSetValid(true); in TEST_F()
525 elf.FakeSetInterface(interface); in TEST_F()
530 elf.GetLastError(&error); in TEST_F()
533 EXPECT_EQ(ERROR_MEMORY_INVALID, elf.GetLastErrorCode()); in TEST_F()
534 EXPECT_EQ(0x1000U, elf.GetLastErrorAddress()); in TEST_F()