Use flag rather than instruction count to handle step mode.
This commit is contained in:
@@ -237,7 +237,7 @@ void ARM_Unicorn::ExecuteInstructions(int num_instructions) {
|
||||
//}
|
||||
Kernel::Thread* thread = Kernel::GetCurrentThread();
|
||||
SaveContext(thread->context);
|
||||
if (last_bkpt_hit || (num_instructions == 1)) {
|
||||
if (last_bkpt_hit || GDBStub::GetCpuStepFlag()) {
|
||||
last_bkpt_hit = false;
|
||||
GDBStub::Break();
|
||||
GDBStub::SendTrap(thread, 5);
|
||||
|
||||
@@ -63,7 +63,6 @@ System::ResultStatus System::RunLoop(bool tight_loop) {
|
||||
// execute. Otherwise, get out of the loop function.
|
||||
if (GDBStub::GetCpuHaltFlag()) {
|
||||
if (GDBStub::GetCpuStepFlag()) {
|
||||
GDBStub::SetCpuStepFlag(false);
|
||||
tight_loop = false;
|
||||
} else {
|
||||
return ResultStatus::Success;
|
||||
@@ -81,6 +80,7 @@ System::ResultStatus System::RunLoop(bool tight_loop) {
|
||||
|
||||
if(GDBStub::IsServerEnabled())
|
||||
{
|
||||
GDBStub::SetCpuStepFlag(false);
|
||||
GDBStub::SetInstCacheValidity(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user