# HG changeset patch # User Thibaut Girka # Date 1341864895 -7200 # Node ID 238d06c6603ea990f42d1aa598eb95cd031c7732 # Parent b07e2f71f240ac21adae75997fca992cfc4ac4bd Add more information to ECL debug messages diff --git a/pytouhou/vm/eclrunner.py b/pytouhou/vm/eclrunner.py --- a/pytouhou/vm/eclrunner.py +++ b/pytouhou/vm/eclrunner.py @@ -172,10 +172,14 @@ class ECLRunner(object): try: callback = self._handlers[instr_type] except KeyError: - logger.warn('unhandled opcode %d (args: %r)', instr_type, args) + logger.warn('[%d %r - %04d] unhandled opcode %d (args: %r)', + id(self), [self.sub] + [e[0] for e in self.stack], + self.frame, instr_type, args) else: + logger.debug('[%d %r - %04d] ins_%d%r', id(self), + [self.sub] + [e[0] for e in self.stack], + self.frame, instr_type, args) callback(self, *args) - logger.debug('executed opcode %d (args: %r)', instr_type, args) self.frame += 1