Made some small changes to breakpoint operations so that enabling Execute on an address doesn't prevent Read and Write breakpoints from functioning if also enabled. Addresses Bug 2806233.

This commit is contained in:
ugetab 2010-04-08 19:30:55 +00:00
parent 895c8111e2
commit df995a5525
1 changed files with 2 additions and 2 deletions

View File

@ -597,10 +597,10 @@ void breakpoint() {
else { //CPU mem breaks
if ((watchpoint[i].flags & WP_E) && (watchpoint[i].flags & brk_type)) {
if (watchpoint[i].endaddress) {
if (((!(watchpoint[i].flags & WP_X)) && (watchpoint[i].address <= A) && (watchpoint[i].endaddress >= A)) ||
if (((watchpoint[i].flags & (WP_R | WP_W)) && (watchpoint[i].address <= A) && (watchpoint[i].endaddress >= A)) ||
((watchpoint[i].flags & WP_X) && (watchpoint[i].address <= _PC) && (watchpoint[i].endaddress >= _PC))) BreakHit();
}
else if (((!(watchpoint[i].flags & WP_X)) && (watchpoint[i].address == A)) ||
else if (((watchpoint[i].flags & (WP_R | WP_W)) && (watchpoint[i].address == A)) ||
((watchpoint[i].flags & WP_X) && (watchpoint[i].address == _PC))) BreakHit();
}
}