diff options
| author | Eli Zaretskii | 2001-05-06 16:32:53 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2001-05-06 16:32:53 +0000 |
| commit | 19cf8f36fda5290270c631835ef74860c8e93cdb (patch) | |
| tree | 08c9f157de9a25d0ce2b997bc1013f8260ad9b9d | |
| parent | d57211a3993a69a0efba9a6971bad9a56169fa1d (diff) | |
| download | emacs-19cf8f36fda5290270c631835ef74860c8e93cdb.tar.gz emacs-19cf8f36fda5290270c631835ef74860c8e93cdb.zip | |
Add hints for running Emacs with malloc debuggers.
| -rw-r--r-- | etc/DEBUG | 41 |
1 files changed, 41 insertions, 0 deletions
| @@ -437,6 +437,47 @@ some extra checks, such as look for broken relations between byte and | |||
| 437 | character positions in buffers and strings; the resulting diagnostics | 437 | character positions in buffers and strings; the resulting diagnostics |
| 438 | might pinpoint the cause of the problem. | 438 | might pinpoint the cause of the problem. |
| 439 | 439 | ||
| 440 | ** Running Emacs built with malloc debugging packages | ||
| 441 | |||
| 442 | If Emacs exhibits bugs that seem to be related to use of memory | ||
| 443 | allocated off the heap, it might be useful to link Emacs with a | ||
| 444 | special debugging library, such as Electric Fence (a.k.a. efence) or | ||
| 445 | GNU Checker, which helps find such problems. | ||
| 446 | |||
| 447 | Emacs compiled with such packages might not run without some hacking, | ||
| 448 | because Emacs replaces the system's memory allocation functions with | ||
| 449 | its own versions, and because the dumping process might be | ||
| 450 | incompatible with the way these packages use to track allocated | ||
| 451 | memory. Here are some of the changes you might find necessary | ||
| 452 | (SYSTEM-NAME and MACHINE-NAME are the names of your OS- and | ||
| 453 | CPU-specific headers in the subdirectories of `src'): | ||
| 454 | |||
| 455 | - In src/s/SYSTEM-NAME.h add "#define SYSTEM_MALLOC". | ||
| 456 | |||
| 457 | - In src/m/MACHINE-NAME.h add "#define CANNOT_DUMP" and | ||
| 458 | "#define CANNOT_UNEXEC". | ||
| 459 | |||
| 460 | - Configure with a different --prefix= option. If you use GCC, | ||
| 461 | version 2.7.2 is preferred, as some malloc debugging packages | ||
| 462 | work a lot better with it than with 2.95 or later versions. | ||
| 463 | |||
| 464 | - Type "make" then "make -k install". | ||
| 465 | |||
| 466 | - If required, invoke the package-specific command to prepare | ||
| 467 | src/temacs for execution. | ||
| 468 | |||
| 469 | - cd ..; src/temacs | ||
| 470 | |||
| 471 | (Note that this runs `temacs' instead of the usual `emacs' executable. | ||
| 472 | This avoids problems with dumping Emacs mentioned above.) | ||
| 473 | |||
| 474 | Some malloc debugging libraries might print lots of false alarms for | ||
| 475 | bitfields used by Emacs in some data structures. If you want to get | ||
| 476 | rid of the false alarms, you will have to hack the definitions of | ||
| 477 | these data structures on the respective headers to remove the `:N' | ||
| 478 | bitfield definitions (which will cause each such field to use a full | ||
| 479 | int). | ||
| 480 | |||
| 440 | ** Some suggestions for debugging on MS Windows: | 481 | ** Some suggestions for debugging on MS Windows: |
| 441 | 482 | ||
| 442 | (written by Marc Fleischeuers, Geoff Voelker and Andrew Innes) | 483 | (written by Marc Fleischeuers, Geoff Voelker and Andrew Innes) |