[Lldb-commits] [lldb] r166859 - in /lldb/trunk/source/Plugins/Process: Utility/StopInfoMachException.cpp gdb-remote/ProcessGDBRemote.cpp
Jim Ingham
jingham at apple.com
Fri Oct 26 19:52:04 PDT 2012
Author: jingham
Date: Fri Oct 26 21:52:04 2012
New Revision: 166859
URL: http://llvm.org/viewvc/llvm-project?rev=166859&view=rev
Log:
If we got what looks like a single step exception but we weren't single stepping then just report
the raw exception.
Modified:
lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
Modified: lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp?rev=166859&r1=166858&r2=166859&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp Fri Oct 26 21:52:04 2012
@@ -365,7 +365,8 @@
return StopInfo::CreateStopReasonWithWatchpointID(thread, wp_sp->GetID());
}
// EXC_ARM_DA_DEBUG seems to be reused for EXC_BREAKPOINT as well as EXC_BAD_ACCESS
- return StopInfo::CreateStopReasonToTrace(thread);
+ if (thread.GetTemporaryResumeState() == eStateStepping)
+ return StopInfo::CreateStopReasonToTrace(thread);
}
else if (exc_code == 1)
{
@@ -405,7 +406,8 @@
return StopInfoSP();
}
- if (is_trace_if_software_breakpoint_missing)
+ // Don't call this a trace if we weren't single stepping this thread.
+ if (is_trace_if_software_breakpoint_missing && thread.GetTemporaryResumeState() == eStateStepping)
{
return StopInfo::CreateStopReasonToTrace (thread);
}
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=166859&r1=166858&r2=166859&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Fri Oct 26 21:52:04 2012
@@ -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)
More information about the lldb-commits
mailing list