aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2001-05-06 16:32:53 +0000
committerEli Zaretskii2001-05-06 16:32:53 +0000
commit19cf8f36fda5290270c631835ef74860c8e93cdb (patch)
tree08c9f157de9a25d0ce2b997bc1013f8260ad9b9d
parentd57211a3993a69a0efba9a6971bad9a56169fa1d (diff)
downloademacs-19cf8f36fda5290270c631835ef74860c8e93cdb.tar.gz
emacs-19cf8f36fda5290270c631835ef74860c8e93cdb.zip
Add hints for running Emacs with malloc debuggers.
-rw-r--r--etc/DEBUG41
1 files changed, 41 insertions, 0 deletions
diff --git a/etc/DEBUG b/etc/DEBUG
index 342699a62ff..b06f255dfc1 100644
--- a/etc/DEBUG
+++ b/etc/DEBUG
@@ -437,6 +437,47 @@ some extra checks, such as look for broken relations between byte and
437character positions in buffers and strings; the resulting diagnostics 437character positions in buffers and strings; the resulting diagnostics
438might pinpoint the cause of the problem. 438might pinpoint the cause of the problem.
439 439
440** Running Emacs built with malloc debugging packages
441
442If Emacs exhibits bugs that seem to be related to use of memory
443allocated off the heap, it might be useful to link Emacs with a
444special debugging library, such as Electric Fence (a.k.a. efence) or
445GNU Checker, which helps find such problems.
446
447Emacs compiled with such packages might not run without some hacking,
448because Emacs replaces the system's memory allocation functions with
449its own versions, and because the dumping process might be
450incompatible with the way these packages use to track allocated
451memory. Here are some of the changes you might find necessary
452(SYSTEM-NAME and MACHINE-NAME are the names of your OS- and
453CPU-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.
472This avoids problems with dumping Emacs mentioned above.)
473
474Some malloc debugging libraries might print lots of false alarms for
475bitfields used by Emacs in some data structures. If you want to get
476rid of the false alarms, you will have to hack the definitions of
477these data structures on the respective headers to remove the `:N'
478bitfield definitions (which will cause each such field to use a full
479int).
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)