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

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

146#include "debug/GDBAcc.hh"
147#include "debug/GDBMisc.hh"
148#include "mem/page_table.hh"
149#include "sim/full_system.hh"
150
151using namespace std;
152using namespace MipsISA;
153
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

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

146#include "debug/GDBAcc.hh"
147#include "debug/GDBMisc.hh"
148#include "mem/page_table.hh"
149#include "sim/full_system.hh"
150
151using namespace std;
152using namespace MipsISA;
153
154RemoteGDB::RemoteGDB(System *_system, ThreadContext *tc)
155 : BaseRemoteGDB(_system, tc), regCache(this)
154RemoteGDB::RemoteGDB(System *_system, ThreadContext *tc, int _port)
155 : BaseRemoteGDB(_system, tc, _port), regCache(this)
156{
157}
158
159/*
160 * Determine if the mapping at va..(va+len) is valid.
161 */
162bool
163RemoteGDB::acc(Addr va, size_t len)
164{
165 TlbEntry entry;
166 //Check to make sure the first byte is mapped into the processes address
167 //space.
168 if (FullSystem)
169 panic("acc not implemented for MIPS FS!");
170 else
156{
157}
158
159/*
160 * Determine if the mapping at va..(va+len) is valid.
161 */
162bool
163RemoteGDB::acc(Addr va, size_t len)
164{
165 TlbEntry entry;
166 //Check to make sure the first byte is mapped into the processes address
167 //space.
168 if (FullSystem)
169 panic("acc not implemented for MIPS FS!");
170 else
171 return context->getProcessPtr()->pTable->lookup(va, entry);
171 return context()->getProcessPtr()->pTable->lookup(va, entry);
172}
173
174void
175RemoteGDB::MipsGdbRegCache::getRegs(ThreadContext *context)
176{
177 DPRINTF(GDBAcc, "getregs in remotegdb \n");
178
179 for (int i = 0; i < 32; i++) r.gpr[i] = context->readIntReg(i);

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

200 context->setMiscRegNoEffect(MISCREG_BADVADDR, r.badvaddr);
201 context->setMiscRegNoEffect(MISCREG_CAUSE, r.cause);
202 context->pcState(r.pc);
203 for (int i = 0; i < 32; i++) context->setFloatRegBits(i, r.fpr[i]);
204 context->setFloatRegBits(FLOATREG_FCCR, r.fsr);
205 context->setFloatRegBits(FLOATREG_FIR, r.fir);
206}
207
172}
173
174void
175RemoteGDB::MipsGdbRegCache::getRegs(ThreadContext *context)
176{
177 DPRINTF(GDBAcc, "getregs in remotegdb \n");
178
179 for (int i = 0; i < 32; i++) r.gpr[i] = context->readIntReg(i);

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

200 context->setMiscRegNoEffect(MISCREG_BADVADDR, r.badvaddr);
201 context->setMiscRegNoEffect(MISCREG_CAUSE, r.cause);
202 context->pcState(r.pc);
203 for (int i = 0; i < 32; i++) context->setFloatRegBits(i, r.fpr[i]);
204 context->setFloatRegBits(FLOATREG_FCCR, r.fsr);
205 context->setFloatRegBits(FLOATREG_FIR, r.fir);
206}
207
208RemoteGDB::BaseGdbRegCache*
209RemoteGDB::gdbRegs() {
208BaseGdbRegCache*
209RemoteGDB::gdbRegs()
210{
210 return &regCache;
211}
211 return &regCache;
212}