remote_gdb.cc (12031:46116545e745) | remote_gdb.cc (12449:2260f4a68210) |
---|---|
1/* 2 * Copyright 2015 LabWare 3 * Copyright 2014 Google, Inc. 4 * Copyright (c) 2002-2005 The Regents of The University of Michigan 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are --- 133 unchanged lines hidden (view full) --- 142#include "sim/byteswap.hh" 143#include "sim/full_system.hh" 144#include "sim/process.hh" 145#include "sim/system.hh" 146 147using namespace std; 148using namespace SparcISA; 149 | 1/* 2 * Copyright 2015 LabWare 3 * Copyright 2014 Google, Inc. 4 * Copyright (c) 2002-2005 The Regents of The University of Michigan 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are --- 133 unchanged lines hidden (view full) --- 142#include "sim/byteswap.hh" 143#include "sim/full_system.hh" 144#include "sim/process.hh" 145#include "sim/system.hh" 146 147using namespace std; 148using namespace SparcISA; 149 |
150RemoteGDB::RemoteGDB(System *_system, ThreadContext *c) 151 : BaseRemoteGDB(_system, c), regCache32(this), regCache64(this) | 150RemoteGDB::RemoteGDB(System *_system, ThreadContext *c, int _port) 151 : BaseRemoteGDB(_system, c, _port), regCache32(this), regCache64(this) |
152{} 153 154/////////////////////////////////////////////////////////// 155// RemoteGDB::acc 156// 157// Determine if the mapping at va..(va+len) is valid. 158// 159bool --- 5 unchanged lines hidden (view full) --- 165 if (FullSystem) { 166 if (va) 167 return true; 168 return false; 169 } else { 170 TlbEntry entry; 171 // Check to make sure the first byte is mapped into the processes 172 // address space. | 152{} 153 154/////////////////////////////////////////////////////////// 155// RemoteGDB::acc 156// 157// Determine if the mapping at va..(va+len) is valid. 158// 159bool --- 5 unchanged lines hidden (view full) --- 165 if (FullSystem) { 166 if (va) 167 return true; 168 return false; 169 } else { 170 TlbEntry entry; 171 // Check to make sure the first byte is mapped into the processes 172 // address space. |
173 if (context->getProcessPtr()->pTable->lookup(va, entry)) | 173 if (context()->getProcessPtr()->pTable->lookup(va, entry)) |
174 return true; 175 return false; 176 } 177} 178 179void 180RemoteGDB::SPARCGdbRegCache::getRegs(ThreadContext *context) 181{ --- 57 unchanged lines hidden (view full) --- 239 pc.nupc(1); 240 context->pcState(pc); 241 // Floating point registers are left at 0 in netbsd 242 // All registers other than the pc, npc and int regs 243 // are ignored as well. 244} 245 246 | 174 return true; 175 return false; 176 } 177} 178 179void 180RemoteGDB::SPARCGdbRegCache::getRegs(ThreadContext *context) 181{ --- 57 unchanged lines hidden (view full) --- 239 pc.nupc(1); 240 context->pcState(pc); 241 // Floating point registers are left at 0 in netbsd 242 // All registers other than the pc, npc and int regs 243 // are ignored as well. 244} 245 246 |
247RemoteGDB::BaseGdbRegCache* | 247BaseGdbRegCache* |
248RemoteGDB::gdbRegs() 249{ | 248RemoteGDB::gdbRegs() 249{ |
250 PSTATE pstate = context->readMiscReg(MISCREG_PSTATE); | 250 PSTATE pstate = context()->readMiscReg(MISCREG_PSTATE); |
251 if (pstate.am) { 252 return ®Cache32; 253 } else { 254 return ®Cache64; 255 } 256} | 251 if (pstate.am) { 252 return ®Cache32; 253 } else { 254 return ®Cache64; 255 } 256} |