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

Unified Diff: src/trusted/gdb_rsp/host.h

Issue 5633007: This change contains changes that were made on a separate copy of this code,... (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 10 years 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: src/trusted/gdb_rsp/host.h
===================================================================
--- src/trusted/gdb_rsp/host.h (revision 3879)
+++ src/trusted/gdb_rsp/host.h (working copy)
@@ -11,8 +11,8 @@
// before restarting the Target, and for updating it's internal array of
// threads whenever the Target stops.
-#ifndef NATIVE_CLIENT_GDB_RSP_HOST_H_
-#define NATIVE_CLIENT_GDB_RSP_HOST_H_ 1
+#ifndef SRC_TRUSTED_GDB_RSP_HOST_H_
noelallen_use_chromium 2010/12/07 23:04:44 NATIVE_CLIENT_xxxx
+#define SRC_TRUSTED_GDB_RSP_HOST_H_ 1
#include <map>
#include <string>
@@ -64,8 +64,8 @@
typedef std::vector<uint32_t> ThreadVector_t;
explicit Host(Session *session);
- ~Host();
- bool Init();
+ virtual ~Host();
+ virtual bool Init();
// The following functions are provided cached values when possible.
// For instance, GetSignal, GetThreads, and GetThread, will return
@@ -75,43 +75,46 @@
// Issue a break request if the target is still running. This is
// asynchronous, we won't actually be "broken" until we get the signal
- bool Break();
+ virtual bool Break();
// Requests that we cleanly detach from the target.
- bool Detach();
+ virtual bool Detach();
// Get the current status of the Target.
- Status GetStatus();
+ virtual Status GetStatus();
// Get the last signal (which put us into the broken state)
- int32_t GetSignal();
+ virtual int32_t GetSignal();
// Get a list of currently active threads
- bool GetThreads(ThreadVector_t *threads) const;
+ virtual bool GetThreads(ThreadVector_t *threads) const;
// Get a thread object by ID.
- Thread *GetThread(uint32_t id);
+ virtual Thread *GetThread(uint32_t id);
// Get and set a block of target memory.
- bool GetMemory(void *dst, uint64_t addr, uint32_t size);
- bool SetMemory(const void *src, uint64_t addr, uint32_t size);
+ virtual bool GetMemory(void *dst, uint64_t addr, uint32_t size);
+ virtual bool SetMemory(const void *src, uint64_t addr, uint32_t size);
// Read locally cached properties
- bool HasProperty(const char *name) const;
- bool ReadProperty(const char *name, std::string *val) const;
+ virtual bool HasProperty(const char *name) const;
+ virtual bool ReadProperty(const char *name, std::string *val) const;
// Read remote object
- bool ReadObject(const char *type, const char *name, std::string *val);
+ virtual bool ReadObject(const char *type, const char *name, std::string *val);
+ // Generic Request
noelallen_use_chromium 2010/12/07 23:04:44 nit: The other comments are sentence, this is a n
mlinck 2010/12/10 21:10:27 Done.
+ virtual bool Request(const std::string &req, std::string *resp);
+
// Set the SINGLE STEP flag on the current thread context, and
// putting the target back into the RUN state.
- bool Step();
+ virtual bool Step();
// Issue a step request, putting us back into the RUN state.
- bool Continue();
+ virtual bool Continue();
// Wait upto the session's packet timeout to see if we receive a break
- bool WaitForBreak();
+ virtual bool WaitForBreak();
// The following functions are internal only and cause communication to
// happen between the target and host. These functions will always
@@ -120,19 +123,18 @@
protected:
// Called whenever the target transitions from running to stopped to
// fetch information about the current state.
- bool Update();
+ virtual bool Update();
- bool Send(Packet *req, Packet *resp);
- bool SendOnly(Packet *req);
+ virtual bool Send(Packet *req, Packet *resp);
+ virtual bool SendOnly(Packet *req);
- bool Request(const std::string &req, std::string *resp);
- bool RequestOnly(const std::string &req);
- bool RequestThreadList(ThreadVector_t *ids);
+ virtual bool RequestOnly(const std::string &req);
+ virtual bool RequestThreadList(ThreadVector_t *ids);
// Parse a string, returning true and update if a valid stop packet
- bool ParseStopPacket(const char *data);
+ virtual bool ParseStopPacket(const char *data);
- private:
+ protected:
noelallen_use_chromium 2010/12/07 23:04:44 Add a comment that this was switched from private
mlinck 2010/12/10 21:10:27 Done.
Session *session_;
const Abi *abi_;
@@ -145,5 +147,5 @@
} // namespace gdb_rsp
-#endif // NATIVE_CLIENT_GDB_RSP_HOST_H_
+#endif // SRC_TRUSTED_GDB_RSP_HOST_H_

Powered by Google App Engine
This is Rietveld 408576698