comparison etc/DEBUG @ 109073:6799ec1a7188

Remove some cpp that is internal to configure.in. * configure.in (C_OPTIMIZE_SWITCH, CANNOT_DUMP, SYSTEM_MALLOC): (USE_MMAP_FOR_BUFFERS, C_WARNING_SWITCH): Set with shell, not cpp. (LIBX): Remove, just use -lX11 in the one place this was used. (cannot_dump): Replace with CANNOT_DUMP. * src/Makefile.in (CANNOT_DUMP): Update for configure name change. * src/s/freebsd.h (USE_MMAP_FOR_BUFFERS): * src/s/irix6-5.h (USE_MMAP_FOR_BUFFERS): * src/s/darwin.h (SYSTEM_MALLOC): * src/s/sol2-10.h (SYSTEM_MALLOC): Move to configure. * src/m/alpha.h: Remove old comment. * src/s/aix4-2.h: Update comment. * src/s/template.h: Remove USE_MMAP_FOR_BUFFERS. * msdos/sed1v2.inp (CANNOT_DUMP): Update for configure name change. * admin/CPP-DEFINES: Remove USE_MMAP_FOR_BUFFERS, CANNOT_DUMP. * etc/DEBUG: Update SYSTEM_MALLOC and CANNOT_DUMP references. Some re-filling.
author Glenn Morris <rgm@gnu.org>
date Tue, 29 Jun 2010 19:48:54 -0700
parents 77227c6520c3
children 417b1e4d63cd
comparison
equal deleted inserted replaced
109072:c70ff40ac4ce 109073:6799ec1a7188
3 Copyright (C) 1985, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 3 Copyright (C) 1985, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
4 2008, 2009, 2010 Free Software Foundation, Inc. 4 2008, 2009, 2010 Free Software Foundation, Inc.
5 See the end of the file for license conditions. 5 See the end of the file for license conditions.
6 6
7 7
8 [People who debug Emacs on Windows using Microsoft debuggers 8 [People who debug Emacs on Windows using Microsoft debuggers should
9 should read the Windows-specific section near the end of this 9 read the Windows-specific section near the end of this document.]
10 document.]
11 10
12 ** When you debug Emacs with GDB, you should start it in the directory 11 ** When you debug Emacs with GDB, you should start it in the directory
13 where the executable was made. That directory has a .gdbinit file 12 where the executable was made. That directory has a .gdbinit file
14 that defines various "user-defined" commands for debugging Emacs. 13 that defines various "user-defined" commands for debugging Emacs.
15 (These commands are described below under "Examining Lisp object 14 (These commands are described below under "Examining Lisp object
48 On modern POSIX systems, you can override that with this command: 47 On modern POSIX systems, you can override that with this command:
49 48
50 handle SIGINT stop nopass 49 handle SIGINT stop nopass
51 50
52 After this `handle' command, SIGINT will return control to GDB. If 51 After this `handle' command, SIGINT will return control to GDB. If
53 you want the C-g to cause a QUIT within Emacs as well, omit the 52 you want the C-g to cause a QUIT within Emacs as well, omit the `nopass'.
54 `nopass'.
55 53
56 A technique that can work when `handle SIGINT' does not is to store 54 A technique that can work when `handle SIGINT' does not is to store
57 the code for some character into the variable stop_character. Thus, 55 the code for some character into the variable stop_character. Thus,
58 56
59 set stop_character = 29 57 set stop_character = 29
441 439
442 It is necessary to refer to the file `nmout' to convert 440 It is necessary to refer to the file `nmout' to convert
443 numeric addresses into symbols and vice versa. 441 numeric addresses into symbols and vice versa.
444 442
445 It is useful to be running under a window system. 443 It is useful to be running under a window system.
446 Then, if Emacs becomes hopelessly wedged, you can create 444 Then, if Emacs becomes hopelessly wedged, you can create another
447 another window to do kill -9 in. kill -ILL is often 445 window to do kill -9 in. kill -ILL is often useful too, since that
448 useful too, since that may make Emacs dump core or return 446 may make Emacs dump core or return to adb.
449 to adb.
450 447
451 448
452 ** Debugging incorrect screen updating. 449 ** Debugging incorrect screen updating.
453 450
454 To debug Emacs problems that update the screen wrong, it is useful 451 To debug Emacs problems that update the screen wrong, it is useful
481 MYCPPFLAGS='-DGLYPH_DEBUG=1' make 478 MYCPPFLAGS='-DGLYPH_DEBUG=1' make
482 479
483 Building Emacs like that activates many assertions which scrutinize 480 Building Emacs like that activates many assertions which scrutinize
484 display code operation more than Emacs does normally. (To see the 481 display code operation more than Emacs does normally. (To see the
485 code which tests these assertions, look for calls to the `xassert' 482 code which tests these assertions, look for calls to the `xassert'
486 macros.) Any assertion that is reported to fail should be 483 macros.) Any assertion that is reported to fail should be investigated.
487 investigated.
488 484
489 Building with GLYPH_DEBUG defined also defines several helper 485 Building with GLYPH_DEBUG defined also defines several helper
490 functions which can help debugging display code. One such function is 486 functions which can help debugging display code. One such function is
491 `dump_glyph_matrix'. If you run Emacs under GDB, you can print the 487 `dump_glyph_matrix'. If you run Emacs under GDB, you can print the
492 contents of any glyph matrix by just calling that function with the 488 contents of any glyph matrix by just calling that function with the
493 matrix as its argument. For example, the following command will print 489 matrix as its argument. For example, the following command will print
494 the contents of the current matrix of the window whose pointer is in 490 the contents of the current matrix of the window whose pointer is in `w':
495 `w':
496 491
497 (gdb) p dump_glyph_matrix (w->current_matrix, 2) 492 (gdb) p dump_glyph_matrix (w->current_matrix, 2)
498 493
499 (The second argument 2 tells dump_glyph_matrix to print the glyphs in 494 (The second argument 2 tells dump_glyph_matrix to print the glyphs in
500 a long form.) You can dump the selected window's current glyph matrix 495 a long form.) You can dump the selected window's current glyph matrix
619 614
620 Emacs compiled with such packages might not run without some hacking, 615 Emacs compiled with such packages might not run without some hacking,
621 because Emacs replaces the system's memory allocation functions with 616 because Emacs replaces the system's memory allocation functions with
622 its own versions, and because the dumping process might be 617 its own versions, and because the dumping process might be
623 incompatible with the way these packages use to track allocated 618 incompatible with the way these packages use to track allocated
624 memory. Here are some of the changes you might find necessary 619 memory. Here are some of the changes you might find necessary:
625 (SYSTEM-NAME and MACHINE-NAME are the names of your OS- and 620
626 CPU-specific headers in the subdirectories of `src'): 621 - Edit configure, to set system_malloc and CANNOT_DUMP to "yes".
627
628 - In src/s/SYSTEM-NAME.h add "#define SYSTEM_MALLOC".
629
630 - In src/m/MACHINE-NAME.h add "#define CANNOT_DUMP"
631 622
632 - Configure with a different --prefix= option. If you use GCC, 623 - Configure with a different --prefix= option. If you use GCC,
633 version 2.7.2 is preferred, as some malloc debugging packages 624 version 2.7.2 is preferred, as some malloc debugging packages
634 work a lot better with it than with 2.95 or later versions. 625 work a lot better with it than with 2.95 or later versions.
635 626