From df995a55259cf2b3157cd23d25fd4a16adfe4f56 Mon Sep 17 00:00:00 2001 From: ugetab Date: Thu, 8 Apr 2010 19:30:55 +0000 Subject: [PATCH] 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. --- src/debug.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/debug.cpp b/src/debug.cpp index bc053980..e293e0e5 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -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(); } }