Home | History | Annotate | Download | only in handler

Lines Matching defs:memory

60 // Flush the instruction cache for a given memory range.
62 void FlushInstructionCache(const char* memory, uint32_t memory_size) {
64 long begin = reinterpret_cast<long>(memory);
81 long begin = reinterpret_cast<long>(memory);
90 cacheflush(const_cast<char*>(memory), memory_size, ICACHE);
489 // Test that memory around the instruction pointer is written
507 // Get some executable memory.
508 char* memory =
515 if (!memory)
519 // of the block of memory, because the minidump should contain 128
521 memcpy(memory + kOffset, kIllegalInstruction, sizeof(kIllegalInstruction));
522 FlushInstructionCache(memory, kMemorySize);
527 reinterpret_cast<void_function>(memory + kOffset);
542 // memory list, and then ensure that there is a memory region
543 // in the memory list that covers the instruction pointer from
581 // Test that the memory region around the instruction pointer is
599 // Get some executable memory.
600 char* memory =
607 if (!memory)
611 // of the block of memory, because the minidump should contain 128
613 memcpy(memory + kOffset, kIllegalInstruction, sizeof(kIllegalInstruction));
614 FlushInstructionCache(memory, kMemorySize);
619 reinterpret_cast<void_function>(memory + kOffset);
634 // memory list, and then ensure that there is a memory region
635 // in the memory list that covers the instruction pointer from
669 // Test that the memory region around the instruction pointer is
680 // test the upper bound of the memory range.
690 // Get some executable memory.
691 char* memory =
698 if (!memory)
702 // of the block of memory, because the minidump should contain 128
704 memcpy(memory + kOffset, kIllegalInstruction, sizeof(kIllegalInstruction));
705 FlushInstructionCache(memory, kMemorySize);
710 reinterpret_cast<void_function>(memory + kOffset);
724 // Read the minidump. Locate the exception record and the memory list, and
725 // then ensure that there is a memory region in the memory list that covers
762 // Ensure that an extra memory block doesn't get added when the instruction
763 // pointer is not in mapped memory.
792 // memory list, and then ensure that there is a memory region
793 // in the memory list that covers the instruction pointer from
809 // Test that anonymous memory maps can be annotated with names and IDs.
833 // Get some memory.
834 char* memory =
841 const uintptr_t kMemoryAddress = reinterpret_cast<uintptr_t>(memory);
842 ASSERT_TRUE(memory);
848 // Add info about the anonymous memory mapping.
858 // |memory| is listed with the given module name and debug ID.
1071 // Test that an additional memory region can be added to the minidump.
1075 // Get some heap memory.
1076 uint8_t* memory = new uint8_t[kMemorySize];
1077 const uintptr_t kMemoryAddress = reinterpret_cast<uintptr_t>(memory);
1078 ASSERT_TRUE(memory);
1080 // Stick some data into the memory so the contents can be verified.
1082 memory[i] = i % 255;
1089 // Add the memory region to the list of memory to be included.
1090 handler.RegisterAppMemory(memory, kMemorySize);
1095 // Read the minidump. Ensure that the memory region is present
1108 // Verify memory contents.
1109 EXPECT_EQ(0, memcmp(region->GetMemory(), memory, kMemorySize));
1111 delete[] memory;
1114 // Test that a memory region that was previously registered
1119 // Get some heap memory.
1120 uint8_t* memory = new uint8_t[kMemorySize];
1121 const uintptr_t kMemoryAddress = reinterpret_cast<uintptr_t>(memory);
1122 ASSERT_TRUE(memory);
1128 // Add the memory region to the list of memory to be included.
1129 handler.RegisterAppMemory(memory, kMemorySize);
1132 handler.UnregisterAppMemory(memory);
1137 // Read the minidump. Ensure that the memory region is not present.
1147 delete[] memory;