remote_gdb.cc (10601:6efb37480d87) | remote_gdb.cc (10707:f7d17d8a854c) |
---|---|
1/* 2 * Copyright 2014 Google Inc. 3 * Copyright (c) 2010, 2013 ARM Limited 4 * All rights reserved 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating --- 128 unchanged lines hidden (view full) --- 137 138#include "arch/arm/decoder.hh" 139#include "arch/arm/pagetable.hh" 140#include "arch/arm/registers.hh" 141#include "arch/arm/remote_gdb.hh" 142#include "arch/arm/system.hh" 143#include "arch/arm/utility.hh" 144#include "arch/arm/vtophys.hh" | 1/* 2 * Copyright 2014 Google Inc. 3 * Copyright (c) 2010, 2013 ARM Limited 4 * All rights reserved 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating --- 128 unchanged lines hidden (view full) --- 137 138#include "arch/arm/decoder.hh" 139#include "arch/arm/pagetable.hh" 140#include "arch/arm/registers.hh" 141#include "arch/arm/remote_gdb.hh" 142#include "arch/arm/system.hh" 143#include "arch/arm/utility.hh" 144#include "arch/arm/vtophys.hh" |
145#include "base/chunk_generator.hh" |
|
145#include "base/intmath.hh" 146#include "base/remote_gdb.hh" 147#include "base/socket.hh" 148#include "base/trace.hh" 149#include "cpu/static_inst.hh" 150#include "cpu/thread_context.hh" 151#include "cpu/thread_state.hh" 152#include "debug/GDBAcc.hh" --- 14 unchanged lines hidden (view full) --- 167 168/* 169 * Determine if the mapping at va..(va+len) is valid. 170 */ 171bool 172RemoteGDB::acc(Addr va, size_t len) 173{ 174 if (FullSystem) { | 146#include "base/intmath.hh" 147#include "base/remote_gdb.hh" 148#include "base/socket.hh" 149#include "base/trace.hh" 150#include "cpu/static_inst.hh" 151#include "cpu/thread_context.hh" 152#include "cpu/thread_state.hh" 153#include "debug/GDBAcc.hh" --- 14 unchanged lines hidden (view full) --- 168 169/* 170 * Determine if the mapping at va..(va+len) is valid. 171 */ 172bool 173RemoteGDB::acc(Addr va, size_t len) 174{ 175 if (FullSystem) { |
175 Addr last_va; 176 va = truncPage(va); 177 last_va = roundPage(va + len); 178 179 do { 180 if (virtvalid(context, va)) { 181 return true; | 176 for (ChunkGenerator gen(va, len, PageBytes); !gen.done(); gen.next()) { 177 if (!virtvalid(context, gen.addr())) { 178 DPRINTF(GDBAcc, "acc: %#x mapping is invalid\n", va); 179 return false; |
182 } | 180 } |
183 va += PageBytes; 184 } while (va < last_va); | 181 } |
185 186 DPRINTF(GDBAcc, "acc: %#x mapping is valid\n", va); 187 return true; 188 } else { 189 TlbEntry entry; 190 //Check to make sure the first byte is mapped into the processes address 191 //space. 192 if (context->getProcessPtr()->pTable->lookup(va, entry)) --- 130 unchanged lines hidden --- | 182 183 DPRINTF(GDBAcc, "acc: %#x mapping is valid\n", va); 184 return true; 185 } else { 186 TlbEntry entry; 187 //Check to make sure the first byte is mapped into the processes address 188 //space. 189 if (context->getProcessPtr()->pTable->lookup(va, entry)) --- 130 unchanged lines hidden --- |