1/*
2 * Copyright 2015 LabWare
3 * Copyright 2014 Google, Inc.
4 * Copyright (c) 2013, 2016 ARM Limited
4 * Copyright (c) 2013, 2016, 2018 ARM Limited
5 * All rights reserved
6 *
7 * The license below extends only to copyright in the software and shall
8 * not be construed as granting a license to any other intellectual
9 * property including but not limited to intellectual property relating
10 * to a hardware implementation of the functionality of the software
11 * licensed hereunder. You may use the software subject to the license
12 * terms below provided that you ensure that this notice is replicated

--- 32 unchanged lines hidden (view full) ---

45 * Boris Shingarov
46 */
47
48#ifndef __ARCH_ARM_REMOTE_GDB_HH__
49#define __ARCH_ARM_REMOTE_GDB_HH__
50
51#include <algorithm>
52
53#include "arch/arm/registers.hh"
54#include "arch/arm/utility.hh"
55#include "base/compiler.hh"
56#include "base/remote_gdb.hh"
57
58class System;
59class ThreadContext;
60
61namespace ArmISA

--- 5 unchanged lines hidden (view full) ---

67 bool acc(Addr addr, size_t len);
68
69 class AArch32GdbRegCache : public BaseGdbRegCache
70 {
71 using BaseGdbRegCache::BaseGdbRegCache;
72 private:
73 struct {
74 uint32_t gpr[16];
74 uint32_t fpr[8*3];
75 uint32_t fpscr;
75 uint32_t cpsr;
76 uint64_t fpr[32];
77 uint32_t fpscr;
78 } M5_ATTR_PACKED r;
79 public:
80 char *data() const { return (char *)&r; }
81 size_t size() const { return sizeof(r); }
82 void getRegs(ThreadContext*);
83 void setRegs(ThreadContext*) const;
84 const std::string
85 name() const

--- 7 unchanged lines hidden (view full) ---

93 using BaseGdbRegCache::BaseGdbRegCache;
94 private:
95 struct {
96 uint64_t x[31];
97 uint64_t spx;
98 uint64_t pc;
99 uint32_t cpsr;
100 VecElem v[NumVecV8ArchRegs * NumVecElemPerVecReg];
101 uint32_t fpsr;
102 uint32_t fpcr;
103 } M5_ATTR_PACKED r;
104 public:
105 char *data() const { return (char *)&r; }
106 size_t size() const { return sizeof(r); }
107 void getRegs(ThreadContext*);
108 void setRegs(ThreadContext*) const;
109 const std::string
110 name() const
111 {
112 return gdb->name() + ".AArch64GdbRegCache";
113 }
114 };
115
116 AArch32GdbRegCache regCache32;
117 AArch64GdbRegCache regCache64;
118
119 public:
120 RemoteGDB(System *_system, ThreadContext *tc, int _port);
121 BaseGdbRegCache *gdbRegs();
122 std::vector<std::string>
123 availableFeatures() const
124 {
125 return {"qXfer:features:read+"};
126 };
127 bool getXferFeaturesRead(const std::string &annex, std::string &output);
128};
129} // namespace ArmISA
130
131#endif /* __ARCH_ARM_REMOTE_GDB_H__ */