If we got what looks like a single step exception but we weren't single stepping then just report
the raw exception.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166859 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 1b3ebc7..7f38cb6 100644
--- a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -1588,9 +1588,13 @@
}
else
{
- // TODO: check for breakpoint or trap opcode in case there is a hard
- // coded software trap
- gdb_thread->SetStopInfo (StopInfo::CreateStopReasonToTrace (*thread_sp));
+ // If we were stepping then assume the stop was the result of the trace. If we were
+ // not stepping then report the SIGTRAP.
+ // FIXME: We are still missing the case where we single step over a trap instruction.
+ if (gdb_thread->GetTemporaryResumeState() == eStateStepping)
+ gdb_thread->SetStopInfo (StopInfo::CreateStopReasonToTrace (*thread_sp));
+ else
+ gdb_thread->SetStopInfo (StopInfo::CreateStopReasonWithSignal(*thread_sp, signo));
}
}
if (!handled)