Merge pull request #942 from Nanquitas/watchpoint-fix

Fix the impossibility to set a second watchpoint
This commit is contained in:
TuxSH 2017-11-22 16:17:53 +01:00 committed by GitHub
commit 55836b48af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -164,7 +164,7 @@ int GDB_RemoveWatchpoint(GDBContext *ctx, u32 address, WatchpointKind kind)
WatchpointKind GDB_GetWatchpointKind(GDBContext *ctx, u32 address) WatchpointKind GDB_GetWatchpointKind(GDBContext *ctx, u32 address)
{ {
u32 id; u32 id;
for(id = 0; id < 2 && manager.watchpoints[id].address != address && manager.watchpoints[id].debug != ctx->debug; id++); for(id = 0; id < 2 && (manager.watchpoints[id].address != address || manager.watchpoints[id].debug != ctx->debug); id++);
return id == 2 ? WATCHPOINT_DISABLED : manager.watchpoints[id].kind; return id == 2 ? WATCHPOINT_DISABLED : manager.watchpoints[id].kind;
} }