/*
+ * Copyright (c) 2015 LabWare
* Copyright (c) 2002-2005 The Regents of The University of Michigan
* All rights reserved.
*
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Authors: Nathan Binkert
+ * Boris Shingarov
*/
#ifndef __ARCH_ALPHA_REMOTE_GDB_HH__
#include <map>
#include "arch/alpha/types.hh"
-#include "arch/alpha/kgdb.h"
-#include "base/remote_gdb.hh"
-#include "cpu/pc_event.hh"
#include "base/pollevent.hh"
+#include "base/remote_gdb.hh"
#include "base/socket.hh"
+#include "cpu/pc_event.hh"
class System;
class ThreadContext;
-class PhysicalMemory;
-namespace AlphaISA
+namespace AlphaISA {
+
+class RemoteGDB : public BaseRemoteGDB
{
- class RemoteGDB : public BaseRemoteGDB
- {
- protected:
- // Machine memory
- bool write(Addr addr, size_t size, const char *data);
+ protected:
+ // Machine memory
+ bool acc(Addr addr, size_t len) override;
+ class AlphaGdbRegCache : public BaseGdbRegCache
+ {
+ using BaseGdbRegCache::BaseGdbRegCache;
+ private:
+ struct {
+ uint64_t gpr[32];
+ uint64_t fpr[32];
+ uint64_t pc;
+ uint64_t vfp;
+ } r;
public:
- RemoteGDB(System *system, ThreadContext *context);
-
- bool acc(Addr addr, size_t len);
-
- protected:
- void getregs();
- void setregs();
-
- void clearSingleStep();
- void setSingleStep();
+ char *data() const { return (char *)&r; }
+ size_t size() const { return sizeof(r); }
+ void getRegs(ThreadContext*);
+ void setRegs(ThreadContext*) const;
+ const std::string
+ name() const
+ {
+ return gdb->name() + ".AlphaGdbRegCache";
+ }
+ };
- protected:
+ public:
+ RemoteGDB(System *system, ThreadContext *context, int _port);
+ BaseGdbRegCache *gdbRegs() override;
+};
- Addr notTakenBkpt;
- Addr takenBkpt;
- };
-}
+} // namespace AlphaISA
-#endif /* __ARCH_ALPHA_REMOTE_GDB_H__ */
+#endif // __ARCH_ALPHA_REMOTE_GDB_HH__