remote_gdb.cc (12031:46116545e745) remote_gdb.cc (12449:2260f4a68210)
1/*
2 * Copyright 2015 LabWare
3 * Copyright 2014 Google, Inc.
4 * Copyright (c) 2010 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

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

143#include "cpu/thread_state.hh"
144#include "debug/GDBAcc.hh"
145#include "mem/page_table.hh"
146#include "sim/full_system.hh"
147
148using namespace std;
149using namespace RiscvISA;
150
1/*
2 * Copyright 2015 LabWare
3 * Copyright 2014 Google, Inc.
4 * Copyright (c) 2010 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

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

143#include "cpu/thread_state.hh"
144#include "debug/GDBAcc.hh"
145#include "mem/page_table.hh"
146#include "sim/full_system.hh"
147
148using namespace std;
149using namespace RiscvISA;
150
151RemoteGDB::RemoteGDB(System *_system, ThreadContext *tc)
152 : BaseRemoteGDB(_system, tc), regCache(this)
151RemoteGDB::RemoteGDB(System *_system, ThreadContext *tc, int _port)
152 : BaseRemoteGDB(_system, tc, _port), regCache(this)
153{
154}
155
156bool
157RemoteGDB::acc(Addr va, size_t len)
158{
159 TlbEntry entry;
160 if (FullSystem)
161 panic("acc not implemented for RISCV FS!");
162 else
153{
154}
155
156bool
157RemoteGDB::acc(Addr va, size_t len)
158{
159 TlbEntry entry;
160 if (FullSystem)
161 panic("acc not implemented for RISCV FS!");
162 else
163 return context->getProcessPtr()->pTable->lookup(va, entry);
163 return context()->getProcessPtr()->pTable->lookup(va, entry);
164}
165
166void
167RemoteGDB::RiscvGdbRegCache::getRegs(ThreadContext *context)
168{
169 DPRINTF(GDBAcc, "getregs in remotegdb, size %lu\n", size());
170 for (int i = 0; i < NumIntArchRegs; i++)
171 r.gpr[i] = context->readIntReg(i);

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

194 context->setMiscReg(0, r.csr_base);
195 context->setMiscReg(MISCREG_FFLAGS, r.fflags);
196 context->setMiscReg(MISCREG_FRM, r.frm);
197 context->setMiscReg(MISCREG_FCSR, r.fcsr);
198 for (int i = ExplicitCSRs; i < NumMiscRegs; i++)
199 context->setMiscReg(i, r.csr[i - ExplicitCSRs]);
200}
201
164}
165
166void
167RemoteGDB::RiscvGdbRegCache::getRegs(ThreadContext *context)
168{
169 DPRINTF(GDBAcc, "getregs in remotegdb, size %lu\n", size());
170 for (int i = 0; i < NumIntArchRegs; i++)
171 r.gpr[i] = context->readIntReg(i);

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

194 context->setMiscReg(0, r.csr_base);
195 context->setMiscReg(MISCREG_FFLAGS, r.fflags);
196 context->setMiscReg(MISCREG_FRM, r.frm);
197 context->setMiscReg(MISCREG_FCSR, r.fcsr);
198 for (int i = ExplicitCSRs; i < NumMiscRegs; i++)
199 context->setMiscReg(i, r.csr[i - ExplicitCSRs]);
200}
201
202RemoteGDB::BaseGdbRegCache*
203RemoteGDB::gdbRegs() {
202BaseGdbRegCache*
203RemoteGDB::gdbRegs()
204{
204 return &regCache;
205}
205 return &regCache;
206}