# HG changeset patch # User Ben Wing # Date 1265145555 21600 # Node ID 1628e3b9601aeef1ec34b5c564cee306b1681f51 # Parent fc28cc192c91533bfa1528cc67682569e363e8ad When aborting due to unknown opcode, output more descriptive msg -------------------- ChangeLog entries follow: -------------------- src/ChangeLog addition: 2010-02-02 Ben Wing * bytecode.c (execute_rare_opcode): * lisp.h (abort_with_msg): New. When aborting due to unknown opcode, output more descriptive msg. diff -r fc28cc192c91 -r 1628e3b9601a src/ChangeLog --- a/src/ChangeLog Mon Feb 01 23:14:46 2010 -0600 +++ b/src/ChangeLog Tue Feb 02 15:19:15 2010 -0600 @@ -1,3 +1,9 @@ +2010-02-02 Ben Wing + + * bytecode.c (execute_rare_opcode): + * lisp.h (abort_with_msg): New. + When aborting due to unknown opcode, output more descriptive msg. + 2010-02-01 Vin Shelton * intl-encap-win32.c: Added description of override keyword. diff -r fc28cc192c91 -r 1628e3b9601a src/bytecode.c --- a/src/bytecode.c Mon Feb 01 23:14:46 2010 -0600 +++ b/src/bytecode.c Tue Feb 02 15:19:15 2010 -0600 @@ -1738,7 +1738,11 @@ } default: - ABORT(); + { + Ascbyte msg[100]; + sprintf (msg, "Unknown opcode %d", opcode); + abort_with_msg (msg); + } break; } return stack_ptr; diff -r fc28cc192c91 -r 1628e3b9601a src/lisp.h --- a/src/lisp.h Mon Feb 01 23:14:46 2010 -0600 +++ b/src/lisp.h Tue Feb 02 15:19:15 2010 -0600 @@ -1253,7 +1253,8 @@ /* Highly dubious kludge */ /* (thanks, Jamie, I feel better now -- ben) */ MODULE_API void assert_failed (const Ascbyte *, int, const Ascbyte *); -#define ABORT() (assert_failed (__FILE__, __LINE__, "ABORT()")) +#define ABORT() assert_failed (__FILE__, __LINE__, "ABORT()") +#define abort_with_msg(msg) assert_failed (__FILE__, __LINE__, msg) /* This used to be ((void) (0)) but that triggers lots of unused variable warnings. It's pointless to force all that code to be rewritten, with