summaryrefslogtreecommitdiff
path: root/src/dbg.c
diff options
context:
space:
mode:
authorGravatar Michael Smith <mikesmiffy128@gmail.com> 2025-06-17 20:18:48 +0100
committerGravatar Michael Smith <mikesmiffy128@gmail.com> 2025-06-21 14:50:00 +0100
commitac7e7d0f21978afc70fe3ef76db69d575742b974 (patch)
tree6fd25c7ded6cfeba7c55b1c26abc82a28878a14e /src/dbg.c
parent1f2d9ce197eafd16803de087cc5b6f8b8f4345a6 (diff)
downloadsst-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.c10
1 files changed, 5 insertions, 5 deletions
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