[Scummvm-git-logs] scummvm master -> 70446d752dcf6fa948c3ea8c216f492d5b05b589
sev-
noreply at scummvm.org
Sun Nov 5 19:30:49 UTC 2023
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
30bf80bfe6 SLUDGE: Fix crash on function exiting
70446d752d SLUDGE: Hid stack debug stack printing behind debugflag
Commit: 30bf80bfe6e2767863731a6f212e056a6f6c380a
https://github.com/scummvm/scummvm/commit/30bf80bfe6e2767863731a6f212e056a6f6c380a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-11-05T20:25:30+01:00
Commit Message:
SLUDGE: Fix crash on function exiting
We were deleting the current function in finishFunction() and
referred to it after for debug printing
Changed paths:
engines/sludge/function.cpp
diff --git a/engines/sludge/function.cpp b/engines/sludge/function.cpp
index 8f963efad02..4e5c3464ad3 100644
--- a/engines/sludge/function.cpp
+++ b/engines/sludge/function.cpp
@@ -654,18 +654,20 @@ bool continueFunction(LoadedFunction *fun) {
return fatal(ERROR_UNKNOWN_CODE);
}
- debugN(" Stack after: ");
- printStack(fun->stack);
+ if (advanceNow) {
+ debugN(" Stack after: ");
- debugN(" Reg after: ");
- fun->reg.debugPrint();
- debug("%s", "");
+ printStack(fun->stack);
- debugN(" Locals after: ");
- printLocals(fun->localVars, fun->numLocals);
+ debugN(" Reg after: ");
+ fun->reg.debugPrint();
+ debug("%s", "");
+
+ debugN(" Locals after: ");
+ printLocals(fun->localVars, fun->numLocals);
- if (advanceNow)
fun->runThisLine++;
+ }
}
return true;
Commit: 70446d752dcf6fa948c3ea8c216f492d5b05b589
https://github.com/scummvm/scummvm/commit/70446d752dcf6fa948c3ea8c216f492d5b05b589
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-11-05T20:30:18+01:00
Commit Message:
SLUDGE: Hid stack debug stack printing behind debugflag
Changed paths:
engines/sludge/function.cpp
diff --git a/engines/sludge/function.cpp b/engines/sludge/function.cpp
index 4e5c3464ad3..7ef43dcfd96 100644
--- a/engines/sludge/function.cpp
+++ b/engines/sludge/function.cpp
@@ -218,15 +218,17 @@ bool continueFunction(LoadedFunction *fun) {
param = fun->compiledLines[fun->runThisLine].param;
com = fun->compiledLines[fun->runThisLine].theCommand;
- debugN(" Stack before: ");
- printStack(fun->stack);
+ if (debugChannelSet(kSludgeDebugStackMachine, -1)) {
+ debugN(" Stack before: ");
+ printStack(fun->stack);
- debugN(" Reg before: ");
- fun->reg.debugPrint();
- debug("%s", "");
+ debugN(" Reg before: ");
+ fun->reg.debugPrint();
+ debug("%s", "");
- debugN(" Locals before: ");
- printLocals(fun->localVars, fun->numLocals);
+ debugN(" Locals before: ");
+ printLocals(fun->localVars, fun->numLocals);
+ }
debugC(1, kSludgeDebugStackMachine, "Executing command line %i: %s(%s)", fun->runThisLine, sludgeText[com], getCommandParameter(com, param).c_str());
@@ -655,16 +657,18 @@ bool continueFunction(LoadedFunction *fun) {
}
if (advanceNow) {
- debugN(" Stack after: ");
+ if (debugChannelSet(kSludgeDebugStackMachine, -1)) {
+ debugN(" Stack after: ");
- printStack(fun->stack);
+ printStack(fun->stack);
- debugN(" Reg after: ");
- fun->reg.debugPrint();
- debug("%s", "");
+ debugN(" Reg after: ");
+ fun->reg.debugPrint();
+ debug("%s", "");
- debugN(" Locals after: ");
- printLocals(fun->localVars, fun->numLocals);
+ debugN(" Locals after: ");
+ printLocals(fun->localVars, fun->numLocals);
+ }
fun->runThisLine++;
}
More information about the Scummvm-git-logs
mailing list