summaryrefslogtreecommitdiff
path: root/src/cpu/simple/base.cc
diff options
context:
space:
mode:
authorMatt Sinclair <mattdsinclair@gmail.com>2017-12-06 20:29:11 -0500
committerMatt Sinclair <mattdsinclair@gmail.com>2017-12-08 04:05:58 +0000
commitbd7eadb4670458044c7628dc67d94d50c3f7593d (patch)
treed56ccd3bea7765af275fdbfcdcdd6b4665775b2e /src/cpu/simple/base.cc
parent66a55ce3ffd42663981a54144cfca311502f22b6 (diff)
downloadgem5-bd7eadb4670458044c7628dc67d94d50c3f7593d.tar.xz
x86,misc: add additional info on faulting X86 instruction, fetched PC
Print faulting instruction for unmapped address panic in faults.cc and print extra info about corresponding fetched PC in base.cc. Change-Id: Id9e15d3e88df2ad6b809fb3cf9f6ae97e9e97e0f Reviewed-on: https://gem5-review.googlesource.com/6461 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/cpu/simple/base.cc')
-rw-r--r--src/cpu/simple/base.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc
index 5c8eba6ef..1f12afbf0 100644
--- a/src/cpu/simple/base.cc
+++ b/src/cpu/simple/base.cc
@@ -475,13 +475,13 @@ BaseSimpleCPU::setupFetchRequest(Request *req)
SimpleThread* thread = t_info.thread;
Addr instAddr = thread->instAddr();
+ Addr fetchPC = (instAddr & PCMask) + t_info.fetchOffset;
// set up memory request for instruction fetch
- DPRINTF(Fetch, "Fetch: PC:%08p\n", instAddr);
+ DPRINTF(Fetch, "Fetch: Inst PC:%08p, Fetch PC:%08p\n", instAddr, fetchPC);
- Addr fetchPC = (instAddr & PCMask) + t_info.fetchOffset;
- req->setVirt(0, fetchPC, sizeof(MachInst), Request::INST_FETCH, instMasterId(),
- instAddr);
+ req->setVirt(0, fetchPC, sizeof(MachInst), Request::INST_FETCH,
+ instMasterId(), instAddr);
}