Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: experimental/windows_debugger/debugger/core/debuggee_process_mock.cc

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Native Client Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 #include "debugger/core/debuggee_process_mock.h"
5
6 namespace debug {
7 DebuggeeProcessMock::DebuggeeProcessMock(DebugAPI* debug_api)
8 : debug_api_(debug_api),
9 nexe_mem_base_(NULL),
10 nexe_entry_point_(NULL) {
11 memset(buff_, kFillChar, sizeof(buff_));
12 }
13
14 bool DebuggeeProcessMock::ReadMemory(const void* addr,
15 size_t size,
16 void* destination) {
17 intptr_t offset = reinterpret_cast<int>(addr);
18 if ((offset < sizeof(buff_)) &&
19 ((offset + size) <= sizeof(buff_))) {
20 memcpy(destination, &buff_[offset], size);
21 return true;
22 }
23 return false;
24 }
25
26 bool DebuggeeProcessMock::WriteMemory(const void* addr,
27 size_t size,
28 const void* source) {
29 intptr_t offset = reinterpret_cast<int>(addr);
30 if ((offset < sizeof(buff_)) &&
31 ((offset + size) <= sizeof(buff_))) {
32 memcpy(&buff_[offset], source, size);
33 return true;
34 }
35 return false;
36 }
37 } // namespace debug
38
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698