Add WriteMemory hooks to TeamMemory / DebuggerInterface to go with ReadMemory.

Will be used in the (eventual) memory inspection tool.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39844 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent 2010-12-13 23:33:29 +00:00
parent 6cdfe5505c
commit 8d8864e162
3 changed files with 15 additions and 0 deletions

View File

@ -575,6 +575,17 @@ DebuggerInterface::ReadMemory(target_addr_t address, void* buffer, size_t size)
}
ssize_t
DebuggerInterface::WriteMemory(target_addr_t address, void* buffer,
size_t size)
{
DebugContextGetter contextGetter(fDebugContextPool);
return debug_write_memory(contextGetter.Context(),
(const void*)(addr_t)address, buffer, size);
}
status_t
DebuggerInterface::_CreateDebugEvent(int32 messageCode,
const debug_debugger_message_data& message, bool& _ignore,

View File

@ -60,6 +60,8 @@ public:
// TeamMemory
virtual ssize_t ReadMemory(target_addr_t address, void* buffer,
size_t size);
virtual ssize_t WriteMemory(target_addr_t address,
void* buffer, size_t size);
private:
struct DebugContext;

View File

@ -21,6 +21,8 @@ public:
size_t size) = 0;
virtual status_t ReadMemoryString(target_addr_t address,
size_t maxLength, BString& _string);
virtual ssize_t WriteMemory(target_addr_t address,
void* buffer, size_t size) = 0;
};