From ac7e7d0f21978afc70fe3ef76db69d575742b974 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Tue, 17 Jun 2025 20:18:48 +0100 Subject: Separate our command callbacks from Source's This improves the ergonomics of a few different things, and sets us up somewhat for the fact OE had a different interface for commands too (it was v1 only and had a separate API call for getting the args). --- src/dbg.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/dbg.c') diff --git a/src/dbg.c b/src/dbg.c index 180c686..af995ce 100644 --- a/src/dbg.c +++ b/src/dbg.c @@ -82,18 +82,18 @@ void dbg_asmdump(const char *name, const void *p, int len) { } DEF_CCMD_HERE(sst_dbg_getcmdcb, "Get the address of a command callback", 0) { - if (cmd->argc != 2) { + if (argc != 2) { con_warn("usage: sst_dbg_getcmdcb command\n"); return; } - struct con_cmd *thecmd = con_findcmd(cmd->argv[1]); + struct con_cmd *thecmd = con_findcmd(argv[1]); if (!thecmd) { - errmsg_errorstd("couldn't find command %s\n", cmd->argv[1]); + errmsg_errorstd("couldn't find command %s\n", argv[1]); return; } #ifdef _WIN32 - con_msg("addr: %p\nghidra: %p\n", (void *)thecmd->cb, - (void *)dbg_toghidra((void *)thecmd->cb)); // ugh + con_msg("addr: %p\nghidra: %p\n", (void *)thecmd->cb_insns, + (void *)dbg_toghidra((void *)thecmd->cb_insns)); // ugh #else con_msg("addr: %p\n", (void *)thecmd->cb); #endif -- cgit v1.2.3-54-g00ecf