aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2001-04-27 16:26:35 +0000
committerEli Zaretskii2001-04-27 16:26:35 +0000
commit3f715e7721b8474fa8d4a7e4093588814d8884a8 (patch)
tree4e1138a71dbe93a98cf77aabed42b07a1d51ac33
parent68b34f99fa2fd34196826905e413f36a8f12c2a5 (diff)
downloademacs-3f715e7721b8474fa8d4a7e4093588814d8884a8.tar.gz
emacs-3f715e7721b8474fa8d4a7e4093588814d8884a8.zip
Document some of the facilities for debugging display code, including
-DGLYPH_DEBUG build and functions that dump glyph matrices.
-rw-r--r--etc/DEBUG32
1 files changed, 32 insertions, 0 deletions
diff --git a/etc/DEBUG b/etc/DEBUG
index fa32646e71b..6b779b10779 100644
--- a/etc/DEBUG
+++ b/etc/DEBUG
@@ -350,6 +350,38 @@ evaluate `(setq inverse-video t)' before you try the operation you think
350will cause too much redrawing. This doesn't refresh the screen, so only 350will cause too much redrawing. This doesn't refresh the screen, so only
351newly drawn text is in inverse video. 351newly drawn text is in inverse video.
352 352
353The Emacs display code includes special debugging code, but it is
354normally disabled. You can enable it by building Emacs with the
355pre-processing symbol GLYPH_DEBUG defined. Here's one easy way,
356suitable for Unix and GNU systems, to build such a debugging version:
357
358 MYCPPFLAGS='-DGLYPH_DEBUG=1' make
359
360Building Emacs like that activates many assertions which scrutinize
361display code operation more than Emacs does normally. (To see the
362code which tests these assertions, look for calls to the `xassert'
363macros.) Any assertion that is reported to fail should be
364investigated.
365
366Building with GLYPH_DEBUG defined also defines several helper
367functions which can help debugging display code. One such function is
368`dump_glyph_matrix'. If you run Emacs under GDB, you can print the
369contents of any glyph matrix by just calling that function with the
370matrix as its argument. For example, the following command will print
371the contents of the current matrix of the window whose pointer is in
372`w':
373
374 (gdb) p dump_glyph_matrix (w->current_matrix, 2)
375
376(The second argument 2 tells dump_glyph_matrix to print the glyphs in
377a long form.) You can dump the selected window's current glyph matrix
378interactively with "M-x dump-glyph-matrix RET"; see the documentation
379of this function for more details.
380
381Several more functions for debugging display code are available in
382Emacs compiled with GLYPH_DEBUG defined; type "C-h f dump- RET" and
383"C-h f trace- RET" to see the full list.
384
353 385
354** Debugging LessTif 386** Debugging LessTif
355 387