remote_gdb.cc (12406:86bde4a026b5) | remote_gdb.cc (12449:2260f4a68210) |
---|---|
1/* 2 * Copyright 2015 LabWare 3 * Copyright 2014 Google, Inc. 4 * Copyright (c) 2007 The Hewlett-Packard Development Company 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 --- 50 unchanged lines hidden (view full) --- 59#include "cpu/thread_context.hh" 60#include "debug/GDBAcc.hh" 61#include "mem/page_table.hh" 62#include "sim/full_system.hh" 63 64using namespace std; 65using namespace X86ISA; 66 | 1/* 2 * Copyright 2015 LabWare 3 * Copyright 2014 Google, Inc. 4 * Copyright (c) 2007 The Hewlett-Packard Development Company 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 --- 50 unchanged lines hidden (view full) --- 59#include "cpu/thread_context.hh" 60#include "debug/GDBAcc.hh" 61#include "mem/page_table.hh" 62#include "sim/full_system.hh" 63 64using namespace std; 65using namespace X86ISA; 66 |
67RemoteGDB::RemoteGDB(System *_system, ThreadContext *c) : 68 BaseRemoteGDB(_system, c), regCache32(this), regCache64(this) | 67RemoteGDB::RemoteGDB(System *_system, ThreadContext *c, int _port) : 68 BaseRemoteGDB(_system, c, _port), regCache32(this), regCache64(this) |
69{} 70 71bool 72RemoteGDB::acc(Addr va, size_t len) 73{ 74 if (FullSystem) { 75 Walker *walker = dynamic_cast<TLB *>( | 69{} 70 71bool 72RemoteGDB::acc(Addr va, size_t len) 73{ 74 if (FullSystem) { 75 Walker *walker = dynamic_cast<TLB *>( |
76 context->getDTBPtr())->getWalker(); | 76 context()->getDTBPtr())->getWalker(); |
77 unsigned logBytes; | 77 unsigned logBytes; |
78 Fault fault = walker->startFunctional(context, va, logBytes, | 78 Fault fault = walker->startFunctional(context(), va, logBytes, |
79 BaseTLB::Read); 80 if (fault != NoFault) 81 return false; 82 83 Addr endVa = va + len - 1; 84 if ((va & ~mask(logBytes)) == (endVa & ~mask(logBytes))) 85 return true; 86 | 79 BaseTLB::Read); 80 if (fault != NoFault) 81 return false; 82 83 Addr endVa = va + len - 1; 84 if ((va & ~mask(logBytes)) == (endVa & ~mask(logBytes))) 85 return true; 86 |
87 fault = walker->startFunctional(context, endVa, logBytes, | 87 fault = walker->startFunctional(context(), endVa, logBytes, |
88 BaseTLB::Read); 89 return fault == NoFault; 90 } else { 91 TlbEntry entry; | 88 BaseTLB::Read); 89 return fault == NoFault; 90 } else { 91 TlbEntry entry; |
92 return context->getProcessPtr()->pTable->lookup(va, entry); | 92 return context()->getProcessPtr()->pTable->lookup(va, entry); |
93 } 94} 95 | 93 } 94} 95 |
96RemoteGDB::BaseGdbRegCache* | 96BaseGdbRegCache* |
97RemoteGDB::gdbRegs() 98{ | 97RemoteGDB::gdbRegs() 98{ |
99 HandyM5Reg m5reg = context->readMiscRegNoEffect(MISCREG_M5_REG); | 99 HandyM5Reg m5reg = context()->readMiscRegNoEffect(MISCREG_M5_REG); |
100 if (m5reg.submode == SixtyFourBitMode) 101 return ®Cache64; 102 else 103 return ®Cache32; 104} 105 106 107 --- 115 unchanged lines hidden --- | 100 if (m5reg.submode == SixtyFourBitMode) 101 return ®Cache64; 102 else 103 return ®Cache32; 104} 105 106 107 --- 115 unchanged lines hidden --- |