diff options
| author | Paul Eggert | 2012-09-04 10:34:54 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-09-04 10:34:54 -0700 |
| commit | 1088b9226e7dac7314dab52ef0696a5f540900cd (patch) | |
| tree | bfae7d26f4b411f5c6a0ef33cfcd0c526619ee56 /src/bytecode.c | |
| parent | 30934d334e8a67c8992d910428758d5b93e0f04f (diff) | |
| download | emacs-1088b9226e7dac7314dab52ef0696a5f540900cd.tar.gz emacs-1088b9226e7dac7314dab52ef0696a5f540900cd.zip | |
Simplify redefinition of 'abort' (Bug#12316).
Do not try to redefine the 'abort' function. Instead, redo
the code so that it calls 'emacs_abort' rather than 'abort'.
This removes the need for the NO_ABORT configure-time macro
and makes it easier to change the abort code to do a backtrace.
* configure.ac (NO_ABRT): Remove.
* admin/CPP-DEFINES (NO_ABORT): Remove.
* nt/inc/ms-w32.h (w32_abort) [HAVE_NTGUI]: Remove.
* src/.gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
* src/emacs.c (abort) [!DOS_NT && !NO_ABORT]:
Remove; sysdep.c's emacs_abort now takes its place.
* src/lisp.h (emacs_abort): New decl. All calls from Emacs code to
'abort' changed to use 'emacs_abort'.
* src/msdos.c (dos_abort) [defined abort]: Remove; not used.
(abort) [!defined abort]: Rename to ...
(emacs_abort): ... new name.
* src/sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
the place of the old 'abort' in emacs.c.
* src/w32.c, src/w32fns.c (abort): Do not #undef.
* src/w32.c (emacs_abort): Rename from w32_abort.
Diffstat (limited to 'src/bytecode.c')
| -rw-r--r-- | src/bytecode.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/bytecode.c b/src/bytecode.c index 40729cbd453..97730636d0e 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -435,7 +435,7 @@ unmark_byte_stack (void) | |||
| 435 | #ifdef BYTE_CODE_SAFE | 435 | #ifdef BYTE_CODE_SAFE |
| 436 | 436 | ||
| 437 | #define CHECK_RANGE(ARG) \ | 437 | #define CHECK_RANGE(ARG) \ |
| 438 | if (ARG >= bytestr_length) abort () | 438 | if (ARG >= bytestr_length) emacs_abort () |
| 439 | 439 | ||
| 440 | #else /* not BYTE_CODE_SAFE */ | 440 | #else /* not BYTE_CODE_SAFE */ |
| 441 | 441 | ||
| @@ -508,7 +508,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 508 | if (FRAME_X_P (f) | 508 | if (FRAME_X_P (f) |
| 509 | && FRAME_FONT (f)->direction != 0 | 509 | && FRAME_FONT (f)->direction != 0 |
| 510 | && FRAME_FONT (f)->direction != 1) | 510 | && FRAME_FONT (f)->direction != 1) |
| 511 | abort (); | 511 | emacs_abort (); |
| 512 | } | 512 | } |
| 513 | #endif | 513 | #endif |
| 514 | 514 | ||
| @@ -600,9 +600,9 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 600 | { | 600 | { |
| 601 | #ifdef BYTE_CODE_SAFE | 601 | #ifdef BYTE_CODE_SAFE |
| 602 | if (top > stacke) | 602 | if (top > stacke) |
| 603 | abort (); | 603 | emacs_abort (); |
| 604 | else if (top < stack.bottom - 1) | 604 | else if (top < stack.bottom - 1) |
| 605 | abort (); | 605 | emacs_abort (); |
| 606 | #endif | 606 | #endif |
| 607 | 607 | ||
| 608 | #ifdef BYTE_CODE_METER | 608 | #ifdef BYTE_CODE_METER |
| @@ -1875,7 +1875,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 1875 | /* Actually this is Bstack_ref with offset 0, but we use Bdup | 1875 | /* Actually this is Bstack_ref with offset 0, but we use Bdup |
| 1876 | for that instead. */ | 1876 | for that instead. */ |
| 1877 | /* CASE (Bstack_ref): */ | 1877 | /* CASE (Bstack_ref): */ |
| 1878 | abort (); | 1878 | emacs_abort (); |
| 1879 | 1879 | ||
| 1880 | /* Handy byte-codes for lexical binding. */ | 1880 | /* Handy byte-codes for lexical binding. */ |
| 1881 | CASE (Bstack_ref1): | 1881 | CASE (Bstack_ref1): |
| @@ -1928,11 +1928,11 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 1928 | #ifdef BYTE_CODE_SAFE | 1928 | #ifdef BYTE_CODE_SAFE |
| 1929 | if (op < Bconstant) | 1929 | if (op < Bconstant) |
| 1930 | { | 1930 | { |
| 1931 | abort (); | 1931 | emacs_abort (); |
| 1932 | } | 1932 | } |
| 1933 | if ((op -= Bconstant) >= const_length) | 1933 | if ((op -= Bconstant) >= const_length) |
| 1934 | { | 1934 | { |
| 1935 | abort (); | 1935 | emacs_abort (); |
| 1936 | } | 1936 | } |
| 1937 | PUSH (vectorp[op]); | 1937 | PUSH (vectorp[op]); |
| 1938 | #else | 1938 | #else |
| @@ -1951,7 +1951,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 1951 | #ifdef BYTE_CODE_SAFE | 1951 | #ifdef BYTE_CODE_SAFE |
| 1952 | error ("binding stack not balanced (serious byte compiler bug)"); | 1952 | error ("binding stack not balanced (serious byte compiler bug)"); |
| 1953 | #else | 1953 | #else |
| 1954 | abort (); | 1954 | emacs_abort (); |
| 1955 | #endif | 1955 | #endif |
| 1956 | 1956 | ||
| 1957 | return result; | 1957 | return result; |