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

Unified Diff: experimental/windows_debugger/debugger/core/debuggee_process_mock.h

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 side-by-side diff with in-line comments
Download patch
Index: experimental/windows_debugger/debugger/core/debuggee_process_mock.h
diff --git a/experimental/windows_debugger/debugger/core/debuggee_process_mock.h b/experimental/windows_debugger/debugger/core/debuggee_process_mock.h
deleted file mode 100644
index f978425eb556e0db68f15cc26cd25bb7e0342acf..0000000000000000000000000000000000000000
--- a/experimental/windows_debugger/debugger/core/debuggee_process_mock.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) 2011 The Native Client Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-#ifndef DEBUGGER_CORE_DEBUGGEE_PROCESS_MOCK_H_
-#define DEBUGGER_CORE_DEBUGGEE_PROCESS_MOCK_H_
-#include <deque>
-#include "debugger/core/debug_event.h"
-#include "debugger/core/debuggee_iprocess.h"
-
-namespace debug {
-/// Mock of DebuggeeProcess.
-///
-/// Used in DebuggeeBreakpoint and DebuggeeThread unit tests.
-/// Provides ReadMemory and WriteMemory methods that access
-/// internal buffer, not debuggee process memory.
-/// Other methods are stubs.
-class DebuggeeProcessMock : public IDebuggeeProcess {
- public:
- /// Mock memory buffer is filled with this character.
- static const unsigned char kFillChar = 0xA7;
- static const int kMemSize = 1000;
-
- /// Fills mock memory buffer is filled with kFillChar.
- explicit DebuggeeProcessMock(DebugAPI* debug_api);
-
- virtual DebugAPI& debug_api() { return *debug_api_; }
-
- /// Reads bytes from |buff_|.
- /// @return false if it tries to read outside of |buff_|.
- virtual bool ReadMemory(const void* addr, size_t size, void* destination);
-
- /// Writes bytes to |buff_|.
- /// @return false if it tries to write outside of |buff_|.
- virtual bool WriteMemory(const void* addr, size_t size, const void* source);
-
- virtual int id() const { return 0;}
- virtual State state() const { return kDead; }
- virtual bool IsHalted() const { return kHalted == state(); }
- virtual const DebugEvent& last_debug_event() const { return debug_event_; }
- virtual void* nexe_mem_base() const { return nexe_mem_base_; }
- virtual void set_nexe_mem_base(void* addr) { nexe_mem_base_ = addr; }
- virtual void* nexe_entry_point() const { return nexe_entry_point_; }
- virtual void set_nexe_entry_point(void* addr) { nexe_entry_point_ = addr; }
- virtual int GetWordSizeInBits() { return 0; }
- virtual bool IsWoW() { return 0;}
- virtual bool Continue() { return false; }
- virtual bool ContinueAndPassExceptionToDebuggee() { return false; }
- virtual bool SingleStep() { return false; }
- virtual bool Break() { return false; }
- virtual bool Kill() { return false; }
- virtual bool Detach() { return false; }
- virtual DebuggeeThread* GetThread(int id) { return NULL; }
- virtual DebuggeeThread* GetHaltedThread() { return NULL; }
- virtual void GetThreadIds(std::deque<int>* threads) const {}
- virtual bool SetBreakpoint(void* addr) { return false; }
- virtual bool RemoveBreakpoint(void* addr) { return false; }
- virtual Breakpoint* GetBreakpoint(void* addr) { return NULL; }
- virtual void GetBreakpoints(std::deque<Breakpoint*>* breakpoints) {}
- virtual void OnDebugEvent(DebugEvent* debug_event) {}
- virtual DebuggeeThread* AddThread(int id, HANDLE handle) { return NULL; }
- virtual void* FromNexeToFlatAddress(void* ptr) const { return NULL; }
-
- private:
- char buff_[kMemSize];
- DebugAPI* debug_api_;
- void* nexe_mem_base_;
- void* nexe_entry_point_;
- DebugEvent debug_event_;
-};
-
-} // namespace debug
-
-#endif // DEBUGGER_CORE_DEBUGGEE_PROCESS_MOCK_H_
-

Powered by Google App Engine
This is Rietveld 408576698