[Scummvm-git-logs] scummvm master -> f2c2453b80bb13abd7e95c6485bceee98d66e724
bluegr
noreply at scummvm.org
Mon Aug 28 20:15:24 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f2c2453b80 SCI: Improve debugger disassembly selector name context
Commit: f2c2453b80bb13abd7e95c6485bceee98d66e724
https://github.com/scummvm/scummvm/commit/f2c2453b80bb13abd7e95c6485bceee98d66e724
Author: Ralph Caraveo (deckarep at gmail.com)
Date: 2023-08-28T23:15:20+03:00
Commit Message:
SCI: Improve debugger disassembly selector name context
Show additional selector name context when push0, push1, push2 opcodes are used.
Possible matching selector names are always shown for the debugger disassembly when a `pushi` opcode is encountered. This is great as it gives additional context when push is used for call/send related invocations.
It would be nice to additionally show *possible* matching `selector` methods/properties when `push0`, `push1` or `push2` is encountered because selector names start at 0 so the dissassembly never shows selectors 0 through 2 inclusive.
Changed paths:
engines/sci/engine/scriptdebug.cpp
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index e4ec0a88c23..0910705d728 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -256,7 +256,10 @@ reg_t disassemble(EngineState *s, reg_t pos, const Object *obj, bool printBWTag,
separator = ", ";
}
- if (opcode == op_pushi && param_value < kernel->getSelectorNamesSize()) {
+ // Provide additional selector name context for all integer push scenarios.
+ if (opcode >= op_push0 && opcode <= op_push2) {
+ debugN("%s%s", separator, kernel->getSelectorName(opcode - op_push0).c_str());
+ } else if (opcode == op_pushi && param_value < kernel->getSelectorNamesSize()) {
debugN("%s%s", separator, kernel->getSelectorName(param_value).c_str());
}
}
More information about the Scummvm-git-logs
mailing list