diff options
| author | Léo Lam <leo@leolam.fr> | 2022-01-03 01:33:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-03 01:33:49 +0100 |
| commit | cbd1c4969d3fb0c17cd3beb4a8560f90c5dedffa (patch) | |
| tree | 6c61dd5fc25abc998cc1db0963914527d4bc78d6 /Source/Core | |
| parent | 27a2df410a1d663483ff783a513266a2d3a5dd1a (diff) | |
| parent | 9c784ca8ab47e564b3a60ac9d5a10ff361197c2e (diff) | |
Merge pull request #10309 from aldelaro5/gdb-stub-fix-watchpoints
Gdb stub: fix watchpoints
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/PowerPC/GDBStub.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/Core/Core/PowerPC/GDBStub.cpp b/Source/Core/Core/PowerPC/GDBStub.cpp index 633e8f7834..f1631e77d8 100644 --- a/Source/Core/Core/PowerPC/GDBStub.cpp +++ b/Source/Core/Core/PowerPC/GDBStub.cpp @@ -53,11 +53,13 @@ enum class BreakpointType { ExecuteSoft = 0, ExecuteHard, - Read, Write, + Read, Access, }; +constexpr u32 NUM_BREAKPOINT_TYPES = 4; + const s64 GDB_UPDATE_CYCLES = 100000; static bool s_has_control = false; @@ -858,7 +860,7 @@ static void HandleAddBreakpoint() u32 i, addr = 0, len = 0; type = Hex2char(s_cmd_bfr[1]); - if (type > 4) + if (type > NUM_BREAKPOINT_TYPES) return SendReply("E01"); i = 3; @@ -879,7 +881,7 @@ static void HandleRemoveBreakpoint() u32 type, addr, len, i; type = Hex2char(s_cmd_bfr[1]); - if (type >= 4) + if (type > NUM_BREAKPOINT_TYPES) return SendReply("E01"); addr = 0; |
