remote_gdb.hh (13471:f41c4625aa79) | remote_gdb.hh (13579:c892d017124f) |
---|---|
1/* 2 * Copyright 2015 LabWare 3 * Copyright 2014 Google, Inc. | 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 | 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" |
|
53#include "arch/arm/utility.hh" 54#include "base/compiler.hh" 55#include "base/remote_gdb.hh" 56 57class System; 58class ThreadContext; 59 60namespace ArmISA --- 5 unchanged lines hidden (view full) --- 66 bool acc(Addr addr, size_t len); 67 68 class AArch32GdbRegCache : public BaseGdbRegCache 69 { 70 using BaseGdbRegCache::BaseGdbRegCache; 71 private: 72 struct { 73 uint32_t gpr[16]; | 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; | |
76 uint32_t cpsr; | 75 uint32_t cpsr; |
76 uint64_t fpr[32]; 77 uint32_t fpscr; |
|
77 } M5_ATTR_PACKED r; 78 public: 79 char *data() const { return (char *)&r; } 80 size_t size() const { return sizeof(r); } 81 void getRegs(ThreadContext*); 82 void setRegs(ThreadContext*) const; 83 const std::string 84 name() const --- 7 unchanged lines hidden (view full) --- 92 using BaseGdbRegCache::BaseGdbRegCache; 93 private: 94 struct { 95 uint64_t x[31]; 96 uint64_t spx; 97 uint64_t pc; 98 uint32_t cpsr; 99 VecElem v[NumVecV8ArchRegs * NumVecElemPerVecReg]; | 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; |
|
100 } M5_ATTR_PACKED r; 101 public: 102 char *data() const { return (char *)&r; } 103 size_t size() const { return sizeof(r); } 104 void getRegs(ThreadContext*); 105 void setRegs(ThreadContext*) const; 106 const std::string 107 name() const 108 { 109 return gdb->name() + ".AArch64GdbRegCache"; 110 } 111 }; 112 113 AArch32GdbRegCache regCache32; 114 AArch64GdbRegCache regCache64; 115 116 public: 117 RemoteGDB(System *_system, ThreadContext *tc, int _port); 118 BaseGdbRegCache *gdbRegs(); | 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); |
|
119}; 120} // namespace ArmISA 121 122#endif /* __ARCH_ARM_REMOTE_GDB_H__ */ | 128}; 129} // namespace ArmISA 130 131#endif /* __ARCH_ARM_REMOTE_GDB_H__ */ |