2,5c2,5
< * Copyright (c) 2002-2005 The Regents of The University of Michigan
< * Copyright (c) 2007-2008 The Florida State University
< * Copyright (c) 2009 The University of Edinburgh
< * Copyright (c) 2015 Sven Karlsson
---
> * Copyright (c) 2017 The University of Virginia
> * Copyright 2015 LabWare
> * Copyright 2014 Google, Inc.
> * Copyright (c) 2007 The Regents of The University of Michigan
32,34c32,33
< * Stephen Hines
< * Timothy M. Jones
< * Sven Karlsson
---
> * Boris Shingarov
> * Alec Roelke
39a39,41
> #include <string>
>
> #include "arch/riscv/registers.hh"
50,51c52,53
< public:
< RemoteGDB(System *system, ThreadContext *context);
---
> protected:
> static const int ExplicitCSRs = 4;
53,54c55
< BaseGdbRegCache *
< gdbRegs();
---
> bool acc(Addr addr, size_t len);
56,57c57,64
< bool
< acc(Addr, size_t);
---
> class RiscvGdbRegCache : public BaseGdbRegCache
> {
> using BaseGdbRegCache::BaseGdbRegCache;
> private:
> struct {
> IntReg gpr[NumIntArchRegs];
> IntReg pc;
> FloatRegBits fpr[NumFloatRegs];
59,60c66,76
< void
< getregs();
---
> MiscReg csr_base;
> uint32_t fflags;
> uint32_t frm;
> uint32_t fcsr;
> MiscReg csr[NumMiscRegs - ExplicitCSRs];
> } __attribute__((__packed__)) r;
> public:
> char *data() const { return (char *)&r; }
> size_t size() const { return sizeof(r); }
> void getRegs(ThreadContext*);
> void setRegs(ThreadContext*) const;
62,63c78,88
< void
< setregs();
---
> const std::string
> name() const
> {
> return gdb->name() + ".RiscvGdbRegCache";
> }
> };
>
>
> public:
> RemoteGDB(System *_system, ThreadContext *tc);
> BaseGdbRegCache *gdbRegs();