Yu-hsin Wang has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/45265 )

Change subject: fastmodel: fix gdb trap event at t = 0
......................................................................

fastmodel: fix gdb trap event at t = 0

maintainStepping function handles events on the current instruction
count. It should be executed when events are scheduled and descheduled.
However, original scheduleInstCountEvent implementation would trigger
maintainStepping if the event should happen at the same time. This makes
gdb fail to trap CPU when wait_for_remote_gdb is specified, since it
needs to schedule and trigger an event at t = 0.

To fix this, we should always trigger maintainStepping when events are
scheduled and descheduled.

Change-Id: I05745e450a4f89ce2e8fe14a68134f4d72e4afc7
---
M src/arch/arm/fastmodel/iris/thread_context.cc
1 file changed, 3 insertions(+), 2 deletions(-)



diff --git a/src/arch/arm/fastmodel/iris/thread_context.cc b/src/arch/arm/fastmodel/iris/thread_context.cc
index b2173e1..0cf1899 100644
--- a/src/arch/arm/fastmodel/iris/thread_context.cc
+++ b/src/arch/arm/fastmodel/iris/thread_context.cc
@@ -451,10 +451,11 @@
 {
     Tick now = getCurrentInstCount();
     comInstEventQueue.schedule(event, count);
+
     if (count <= now)
         call().simulationTime_stop(iris::IrisInstIdSimulationEngine);
-    else
-        maintainStepping();
+
+    maintainStepping();
 }

 void

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45265
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I05745e450a4f89ce2e8fe14a68134f4d72e4afc7
Gerrit-Change-Number: 45265
Gerrit-PatchSet: 1
Gerrit-Owner: Yu-hsin Wang <yuhsi...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to