remote_gdb.cc (8332:23711432221f) remote_gdb.cc (8767:e575781f71b8)
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;

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

130#include "config/full_system.hh"
131#include "cpu/static_inst.hh"
132#include "cpu/thread_context.hh"
133#include "debug/GDBRead.hh"
134#include "mem/page_table.hh"
135#include "mem/physical.hh"
136#include "mem/port.hh"
137#include "sim/byteswap.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;

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

130#include "config/full_system.hh"
131#include "cpu/static_inst.hh"
132#include "cpu/thread_context.hh"
133#include "debug/GDBRead.hh"
134#include "mem/page_table.hh"
135#include "mem/physical.hh"
136#include "mem/port.hh"
137#include "sim/byteswap.hh"
138#include "sim/full_system.hh"
138#include "sim/process.hh"
139#include "sim/system.hh"
140
141using namespace std;
142using namespace SparcISA;
143
144RemoteGDB::RemoteGDB(System *_system, ThreadContext *c)
145 : BaseRemoteGDB(_system, c, NumGDBRegs), nextBkpt(0)

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

151// Determine if the mapping at va..(va+len) is valid.
152//
153bool
154RemoteGDB::acc(Addr va, size_t len)
155{
156 //@Todo In NetBSD, this function checks if all addresses
157 // from va to va + len have valid page map entries. Not
158 // sure how this will work for other OSes or in general.
139#include "sim/process.hh"
140#include "sim/system.hh"
141
142using namespace std;
143using namespace SparcISA;
144
145RemoteGDB::RemoteGDB(System *_system, ThreadContext *c)
146 : BaseRemoteGDB(_system, c, NumGDBRegs), nextBkpt(0)

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

152// Determine if the mapping at va..(va+len) is valid.
153//
154bool
155RemoteGDB::acc(Addr va, size_t len)
156{
157 //@Todo In NetBSD, this function checks if all addresses
158 // from va to va + len have valid page map entries. Not
159 // sure how this will work for other OSes or in general.
159#if FULL_SYSTEM
160 if (va)
161 return true;
162 return false;
163#else
164 TlbEntry entry;
165 // Check to make sure the first byte is mapped into the processes address
166 // space.
167 if (context->getProcessPtr()->pTable->lookup(va, entry))
168 return true;
169 return false;
170#endif
160 if (FullSystem) {
161 if (va)
162 return true;
163 return false;
164 } else {
165 TlbEntry entry;
166 // Check to make sure the first byte is mapped into the processes
167 // address space.
168 if (context->getProcessPtr()->pTable->lookup(va, entry))
169 return true;
170 return false;
171 }
171}
172
173///////////////////////////////////////////////////////////
174// RemoteGDB::getregs
175//
176// Translate the kernel debugger register format into
177// the GDB register format.
178void

--- 76 unchanged lines hidden ---
172}
173
174///////////////////////////////////////////////////////////
175// RemoteGDB::getregs
176//
177// Translate the kernel debugger register format into
178// the GDB register format.
179void

--- 76 unchanged lines hidden ---