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/byteswap.hh"
150
151using namespace std;
152using namespace PowerISA;
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/byteswap.hh"
150
151using namespace std;
152using namespace PowerISA;
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. At the time of this writing, the acc() check is used when
168 //processing the MemR/MemW packets before actually asking the translating
169 //port proxy to read/writeBlob. I (bgs) am not convinced the first byte
170 //check is enough.
171 if (FullSystem)
172 panic("acc not implemented for POWER FS!");
173 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. At the time of this writing, the acc() check is used when
168 //processing the MemR/MemW packets before actually asking the translating
169 //port proxy to read/writeBlob. I (bgs) am not convinced the first byte
170 //check is enough.
171 if (FullSystem)
172 panic("acc not implemented for POWER FS!");
173 else
174 return context->getProcessPtr()->pTable->lookup(va, entry);
174 return context()->getProcessPtr()->pTable->lookup(va, entry);
175}
176
177void
178RemoteGDB::PowerGdbRegCache::getRegs(ThreadContext *context)
179{
180 DPRINTF(GDBAcc, "getRegs in remotegdb \n");
181
182 // Default order on 32-bit PowerPC:

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

211 context->pcState(betoh(r.pc));
212 // Is MSR modeled?
213 context->setIntReg(INTREG_CR, betoh(r.cr));
214 context->setIntReg(INTREG_LR, betoh(r.lr));
215 context->setIntReg(INTREG_CTR, betoh(r.ctr));
216 context->setIntReg(INTREG_XER, betoh(r.xer));
217}
218
175}
176
177void
178RemoteGDB::PowerGdbRegCache::getRegs(ThreadContext *context)
179{
180 DPRINTF(GDBAcc, "getRegs in remotegdb \n");
181
182 // Default order on 32-bit PowerPC:

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

211 context->pcState(betoh(r.pc));
212 // Is MSR modeled?
213 context->setIntReg(INTREG_CR, betoh(r.cr));
214 context->setIntReg(INTREG_LR, betoh(r.lr));
215 context->setIntReg(INTREG_CTR, betoh(r.ctr));
216 context->setIntReg(INTREG_XER, betoh(r.xer));
217}
218
219RemoteGDB::BaseGdbRegCache*
220RemoteGDB::gdbRegs() {
219BaseGdbRegCache*
220RemoteGDB::gdbRegs()
221{
221 return &regCache;
222}
223
222 return &regCache;
223}
224