diff options
author | 2025-06-17 20:18:48 +0100 | |
---|---|---|
committer | 2025-06-21 14:50:00 +0100 | |
commit | ac7e7d0f21978afc70fe3ef76db69d575742b974 (patch) | |
tree | 6fd25c7ded6cfeba7c55b1c26abc82a28878a14e /src/dbg.c | |
parent | 1f2d9ce197eafd16803de087cc5b6f8b8f4345a6 (diff) | |
download | sst-ac7e7d0f21978afc70fe3ef76db69d575742b974.tar.gz sst-ac7e7d0f21978afc70fe3ef76db69d575742b974.zip |
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).
Diffstat (limited to 'src/dbg.c')
-rw-r--r-- | src/dbg.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 |