arch-arm: Check if VectorCatch is nullptr

This is needed after [1].
Simulation starts with a call to the reset fault in the
initState stage and therefore checks for the vector catch
object. This happens before the SelfDebug object is properly
initialized.

[1]: https://gem5-review.googlesource.com/c/public/gem5/+/60730

Change-Id: Ic117413611aa30386327bbc13e5489fab32733de
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60769
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
Giacomo Travaglini
2022-06-27 14:51:41 +01:00
parent b9186e2e70
commit b0eaecc77b
2 changed files with 2 additions and 2 deletions

View File

@@ -734,7 +734,7 @@ ArmFault::vectorCatch(ThreadContext *tc, const StaticInstPtr &inst)
{
SelfDebug *sd = ArmISA::ISA::getSelfDebug(tc);
VectorCatch* vc = sd->getVectorCatch(tc);
if (!vc->isVCMatch()) {
if (vc && !vc->isVCMatch()) {
Fault fault = sd->testVectorCatch(tc, 0x0, this);
if (fault != NoFault)
fault->invoke(tc, inst);

View File

@@ -294,7 +294,7 @@ class SelfDebug
public:
SelfDebug()
: enableTdeTge(false),
: softStep(nullptr), vcExcpt(nullptr), enableTdeTge(false),
mde(false), sdd(false), kde(false), oslk(false)
{
softStep = new SoftwareStep(this);