Don't adjust the program counter to an invalid address after reaching a

breakpoint. The value doesn't need to be adjusted as it is already
correctly returned from the kernel.

This allows lldb to set breakpoints, and stop on them, however more work
is needed, for example single stepping fails to stop.

Discussed with:	emaste
This commit is contained in:
andrew 2015-12-22 17:18:40 +00:00
parent 61dcb56e93
commit 70e594b060

View File

@ -260,13 +260,9 @@ RegisterContextPOSIXProcessMonitor_arm64::HardwareSingleStep(bool enable)
bool
RegisterContextPOSIXProcessMonitor_arm64::UpdateAfterBreakpoint()
{
// PC points one byte past the int3 responsible for the breakpoint.
lldb::addr_t pc;
if ((pc = GetPC()) == LLDB_INVALID_ADDRESS)
if (GetPC() == LLDB_INVALID_ADDRESS)
return false;
SetPC(pc - 1);
return true;
}