remote_gdb.cc (4172:141705d83494) | remote_gdb.cc (5107:dc6ad5315cc1) |
---|---|
1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 116 unchanged lines hidden (view full) --- 125#include "arch/sparc/remote_gdb.hh" 126#include "base/intmath.hh" 127#include "base/remote_gdb.hh" 128#include "base/socket.hh" 129#include "base/trace.hh" 130#include "config/full_system.hh" 131#include "cpu/thread_context.hh" 132#include "cpu/static_inst.hh" | 1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 116 unchanged lines hidden (view full) --- 125#include "arch/sparc/remote_gdb.hh" 126#include "base/intmath.hh" 127#include "base/remote_gdb.hh" 128#include "base/socket.hh" 129#include "base/trace.hh" 130#include "config/full_system.hh" 131#include "cpu/thread_context.hh" 132#include "cpu/static_inst.hh" |
133#include "mem/page_table.hh" |
|
133#include "mem/physical.hh" 134#include "mem/port.hh" | 134#include "mem/physical.hh" 135#include "mem/port.hh" |
136#include "sim/process.hh" |
|
135#include "sim/system.hh" 136 137using namespace std; 138using namespace TheISA; 139 140RemoteGDB::RemoteGDB(System *_system, ThreadContext *c) 141 : BaseRemoteGDB(_system, c, NumGDBRegs), nextBkpt(0) 142{} 143 144/////////////////////////////////////////////////////////// 145// RemoteGDB::acc 146// 147// Determine if the mapping at va..(va+len) is valid. 148// 149bool 150RemoteGDB::acc(Addr va, size_t len) 151{ 152 //@Todo In NetBSD, this function checks if all addresses | 137#include "sim/system.hh" 138 139using namespace std; 140using namespace TheISA; 141 142RemoteGDB::RemoteGDB(System *_system, ThreadContext *c) 143 : BaseRemoteGDB(_system, c, NumGDBRegs), nextBkpt(0) 144{} 145 146/////////////////////////////////////////////////////////// 147// RemoteGDB::acc 148// 149// Determine if the mapping at va..(va+len) is valid. 150// 151bool 152RemoteGDB::acc(Addr va, size_t len) 153{ 154 //@Todo In NetBSD, this function checks if all addresses |
153 //from va to va + len have valid page mape entries. Not | 155 //from va to va + len have valid page map entries. Not |
154 //sure how this will work for other OSes or in general. | 156 //sure how this will work for other OSes or in general. |
157#if FULL_SYSTEM |
|
155 if (va) 156 return true; 157 return false; | 158 if (va) 159 return true; 160 return false; |
161#else 162 TlbEntry entry; 163 //Check to make sure the first byte is mapped into the processes address 164 //space. 165 if (context->getProcessPtr()->pTable->lookup(va, entry)) 166 return true; 167 return false; 168#endif |
|
158} 159 160/////////////////////////////////////////////////////////// 161// RemoteGDB::getregs 162// 163// Translate the kernel debugger register format into 164// the GDB register format. 165void --- 69 unchanged lines hidden --- | 169} 170 171/////////////////////////////////////////////////////////// 172// RemoteGDB::getregs 173// 174// Translate the kernel debugger register format into 175// the GDB register format. 176void --- 69 unchanged lines hidden --- |