Fix fatal error when attempting to set watchpoint covering unaligned portions of two adjacent native words

This commit is contained in:
AJR 2019-06-12 19:22:17 -04:00
parent 54b3e04d09
commit 788409adea

View File

@ -2846,10 +2846,13 @@ device_debug::watchpoint::watchpoint(device_debug* debugInterface,
}
else
{
m_start_address[idx] = rstart;
m_end_address[idx] = rend - subamask - 1;
m_masks[idx] = mmask;
idx++;
if (rstart < rend - subamask)
{
m_start_address[idx] = rstart;
m_end_address[idx] = rend - subamask - 1;
m_masks[idx] = mmask;
idx++;
}
m_start_address[idx] = rend - subamask;
m_end_address[idx] = rend;
m_masks[idx] = emask;