| 793 | |
| 794 | |
| 795 | bool LldbAdapter::WriteMemory(std::uintptr_t address, const DataBuffer& buffer) |
| 796 | { |
| 797 | if (!m_quitingMutex.try_lock()) |
| 798 | return false; |
| 799 | |
| 800 | SBError error; |
| 801 | size_t bytesWritten = m_process.WriteMemory(address, buffer.GetData(), buffer.GetLength(), error); |
| 802 | if ((bytesWritten == buffer.GetLength()) && error.Success()) |
| 803 | { |
| 804 | m_quitingMutex.unlock(); |
| 805 | return true; |
| 806 | } |
| 807 | |
| 808 | m_quitingMutex.unlock(); |
| 809 | return false; |
| 810 | } |
| 811 | |
| 812 | |
| 813 | static uint64_t GetModuleHighestAddress(SBModule& module, SBTarget& target) |