From 665f7eb823b44ba8efca5215ffb286edfe42db5f Mon Sep 17 00:00:00 2001 From: Matthew Stanley <1379tech@gmail.com> Date: Mon, 19 Oct 2026 18:27:56 -0700 Subject: [PATCH] Guard session_restart debug command in no-debug-tools builds Co-Authored-By: Claude Opus 5.5 (1M context) --- runtime/src/debug_server.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runtime/src/debug_server.c b/runtime/src/debug_server.c index 3d637a56..31f1b0bd 100644 --- a/runtime/src/debug_server.c +++ b/runtime/src/debug_server.c @@ -9422,6 +9422,8 @@ static void handle_host_key(int id, const char *json) send_fmt("{\"id\":%d,\"ok\":%s}", id, ok ? "true" : "false"); } +#ifndef PSX_NO_DEBUG_TOOLS +/* main.cpp defines the restart hook only with debug tools; so does the table. */ extern int psx_debug_restart_session(int disc); static void handle_session_restart(int id, const char *json) { @@ -9431,6 +9433,7 @@ static void handle_session_restart(int id, const char *json) } send_ok(id); } +#endif /* host_button name= down=<1|0>, both when omitted. */ extern int psx_debug_push_host_button(const char *name, int down); @@ -16182,7 +16185,9 @@ static const CmdEntry s_commands[] = { { "debug_key", handle_debug_key }, { "host_pause", handle_host_pause }, { "host_key", handle_host_key }, +#ifndef PSX_NO_DEBUG_TOOLS { "session_restart", handle_session_restart }, +#endif { "host_button", handle_host_button }, { "menu_host", handle_menu_host }, { "host_mouse", handle_host_mouse },