SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 917b62785ca8aa7cf55f6a49868229fc2a3bd391 parent 7b511dd76b9977a16442e94ca8a876c49ec0f7fb Author: Lior Halphon <LIJI32@gmail.com> Date: Sat, 15 Mar 2025 12:48:09 +0200 The watchpoint command now outputs the watchpoint type upon adding one Diffstat:
| M | Core/debugger.c | 10 | ++++++++-- |
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/Core/debugger.c b/Core/debugger.c @@ -1276,12 +1276,18 @@ static bool watch(GB_gameboy_t *gb, char *arguments, char *modifiers, const debu .inclusive = inclusive, }; + const char *flags_string = inline_const(const char *[], { + [WATCHPOINT_READ] = "read-only", + [WATCHPOINT_WRITE] = "write-only", + [WATCHPOINT_READ | WATCHPOINT_WRITE] = "read-write", + })[flags]; + GB_log(gb, "Watchpoint %u set at %s", id, debugger_value_to_string(gb, result, true, false)); if (length) { - GB_log(gb, " - %s%s\n", debugger_value_to_string(gb, end, true, true), inclusive? " (inclusive)" : ""); + GB_log(gb, " - %s%s, %s\n", debugger_value_to_string(gb, end, true, true), inclusive? " (inclusive)" : "", flags_string); } else { - GB_log(gb, "\n"); + GB_log(gb, ", %s\n", flags_string); } return true; }
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.