summaryrefslogtreecommitdiff
path: root/src/arch/sparc/remote_gdb.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-10-02 23:03:38 -0700
committerGabe Black <gblack@eecs.umich.edu>2007-10-02 23:03:38 -0700
commit50e2d20cb876a054f53162e7b01306039c213457 (patch)
tree6e7de959159434e1501ab928bdfbebc91388b353 /src/arch/sparc/remote_gdb.cc
parentc2d60abf52fc81119970ab0617f9a979f1377685 (diff)
parent7571e8346d0ebbc38806c30a75dbcf298d50f08e (diff)
downloadgem5-50e2d20cb876a054f53162e7b01306039c213457.tar.xz
Merge with head.
--HG-- extra : convert_revision : 1aa0e4569a7c10e6a395c2c951ac29275b5bcf59
Diffstat (limited to 'src/arch/sparc/remote_gdb.cc')
-rw-r--r--src/arch/sparc/remote_gdb.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/arch/sparc/remote_gdb.cc b/src/arch/sparc/remote_gdb.cc
index 85b0c03a3..67cc5b0d1 100644
--- a/src/arch/sparc/remote_gdb.cc
+++ b/src/arch/sparc/remote_gdb.cc
@@ -130,8 +130,10 @@
#include "config/full_system.hh"
#include "cpu/thread_context.hh"
#include "cpu/static_inst.hh"
+#include "mem/page_table.hh"
#include "mem/physical.hh"
#include "mem/port.hh"
+#include "sim/process.hh"
#include "sim/system.hh"
using namespace std;
@@ -150,11 +152,20 @@ bool
RemoteGDB::acc(Addr va, size_t len)
{
//@Todo In NetBSD, this function checks if all addresses
- //from va to va + len have valid page mape entries. Not
+ //from va to va + len have valid page map entries. Not
//sure how this will work for other OSes or in general.
+#if FULL_SYSTEM
if (va)
return true;
return false;
+#else
+ TlbEntry entry;
+ //Check to make sure the first byte is mapped into the processes address
+ //space.
+ if (context->getProcessPtr()->pTable->lookup(va, entry))
+ return true;
+ return false;
+#endif
}
///////////////////////////////////////////////////////////