If a single step ends on a breakpoint, it should be reported as a breakpoint hit

even though the underlying exception is a trace exception.

<rdar://problem/15243355>

llvm-svn: 204534
This commit is contained in:
Jim Ingham 2014-03-22 00:44:41 +00:00
parent d1c22bef6f
commit 7dabe1a1b6
1 changed files with 23 additions and 13 deletions

View File

@ -363,7 +363,16 @@ StopInfoMachException::CreateStopReasonWithMachException
if (exc_code == 1) // EXC_I386_SGL
{
if (!exc_sub_code)
return StopInfo::CreateStopReasonToTrace(thread);
{
// This looks like a plain trap.
// Have to check if there is a breakpoint here as well. When you single-step onto a trap,
// the single step stops you not to trap. Since we also do that check below, let's just use
// that logic.
is_actual_breakpoint = true;
is_trace_if_actual_breakpoint_missing = true;
}
else
{
// It's a watchpoint, then.
// The exc_sub_code indicates the data break address.
@ -379,6 +388,7 @@ StopInfoMachException::CreateStopReasonWithMachException
return StopInfo::CreateStopReasonWithWatchpointID(thread, wp_sp->GetID());
}
}
}
else if (exc_code == 2 || // EXC_I386_BPT
exc_code == 3) // EXC_I386_BPTFLT
{