summaryrefslogtreecommitdiff
path: root/src/arch/arm/remote_gdb.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm/remote_gdb.cc')
-rw-r--r--src/arch/arm/remote_gdb.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/arch/arm/remote_gdb.cc b/src/arch/arm/remote_gdb.cc
index 1686cab39..d52a9db17 100644
--- a/src/arch/arm/remote_gdb.cc
+++ b/src/arch/arm/remote_gdb.cc
@@ -142,6 +142,7 @@
#include "arch/arm/system.hh"
#include "arch/arm/utility.hh"
#include "arch/arm/vtophys.hh"
+#include "base/chunk_generator.hh"
#include "base/intmath.hh"
#include "base/remote_gdb.hh"
#include "base/socket.hh"
@@ -172,16 +173,12 @@ bool
RemoteGDB::acc(Addr va, size_t len)
{
if (FullSystem) {
- Addr last_va;
- va = truncPage(va);
- last_va = roundPage(va + len);
-
- do {
- if (virtvalid(context, va)) {
- return true;
+ for (ChunkGenerator gen(va, len, PageBytes); !gen.done(); gen.next()) {
+ if (!virtvalid(context, gen.addr())) {
+ DPRINTF(GDBAcc, "acc: %#x mapping is invalid\n", va);
+ return false;
}
- va += PageBytes;
- } while (va < last_va);
+ }
DPRINTF(GDBAcc, "acc: %#x mapping is valid\n", va);
return true;