sim: Add getter to fault virtual address
authorGabor Dozsa <gabor.dozsa@arm.com>
Tue, 11 Jun 2019 10:47:16 +0000 (11:47 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Thu, 18 Jul 2019 15:09:22 +0000 (15:09 +0000)
Change-Id: Ifd493aee9e78b0b4ddcc71e90f48679543acb861
Signed-off-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19176
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/sim/faults.hh

index 74759715204d25af2b79a79141cb52ee19c484ce..47855e7c28a8967dccb44cacbb0d5437c221532d 100644 (file)
@@ -99,6 +99,7 @@ class GenericPageTableFault : public FaultBase
     GenericPageTableFault(Addr va) : vaddr(va) {}
     void invoke(ThreadContext * tc, const StaticInstPtr &inst =
                 StaticInst::nullStaticInstPtr);
+    Addr getFaultVAddr() const { return vaddr; }
 };
 
 class GenericAlignmentFault : public FaultBase
@@ -110,6 +111,7 @@ class GenericAlignmentFault : public FaultBase
     GenericAlignmentFault(Addr va) : vaddr(va) {}
     void invoke(ThreadContext * tc, const StaticInstPtr &inst =
                 StaticInst::nullStaticInstPtr);
+    Addr getFaultVAddr() const { return vaddr; }
 };
 
 #endif // __FAULTS_HH__