[Scummvm-devel] Improving the scumm debugger

Alban Bedel albeu at free.fr
Fri Jul 22 06:42:53 CEST 2005


Hi all,

As part of my work on scummc I would be intersted in improving the scumm
debugger because currently it is a bit too limited for easy use when
writing new scripts.

The biggest problem is that one can't break in the scripts. I made some
experimental hack for this, but then one have to manualy lookup (in the
linker output) the address used by the variables, still no way to step,
etc. Some bigger work is needed.

Implementing this would mean quiet some changes, so first I would really
like to hear what you all think of the following propositions and if such
kind of things would stand a chance to be accepted in scummvm ?


Regrading break points and stepping i'm thinking of using the opcode
0xC1. It take an integer and a string as argument. According to cyx it
is originaly a debug opcode and it seems to be simply ignored by
production LEC interpreters.

The scummc compiler could add call to this op before each instruction.
In scummc instructions are closed expression with respect to the stack
so there shouldn't be much problem in stopping scripts at these points.
Using the string argument one could easily pass the source string to
the debugger, removing the need to have code to lookup for source file,
etc.

For symbols name the simplest is probably to store a table in the game
file but i don't know how the LEC interpreter would react to that.
Alternatively one can put the table in a separate file. Personaly
i prefer not having to carry too many files around, but it would allow
creating and using tables for existing games.

That's it for now, comments, suggestions, etc are more than welcome.

	Albeu





More information about the Scummvm-devel mailing list