Mercurial > hg > xemacs-beta
changeset 4914:1628e3b9601a
When aborting due to unknown opcode, output more descriptive msg
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2010-02-02 Ben Wing <ben@xemacs.org>
* bytecode.c (execute_rare_opcode):
* lisp.h (abort_with_msg): New.
When aborting due to unknown opcode, output more descriptive msg.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Tue, 02 Feb 2010 15:19:15 -0600 |
parents | fc28cc192c91 |
children | bedf3747a6d7 17362f371cc2 |
files | src/ChangeLog src/bytecode.c src/lisp.h |
diffstat | 3 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 <ben@xemacs.org> + + * 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 <acs@xemacs.org> * intl-encap-win32.c: Added description of override keyword.
--- 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;
--- 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