diff options
| author | Eli Zaretskii | 2001-04-27 16:26:35 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2001-04-27 16:26:35 +0000 |
| commit | 3f715e7721b8474fa8d4a7e4093588814d8884a8 (patch) | |
| tree | 4e1138a71dbe93a98cf77aabed42b07a1d51ac33 | |
| parent | 68b34f99fa2fd34196826905e413f36a8f12c2a5 (diff) | |
| download | emacs-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/DEBUG | 32 |
1 files changed, 32 insertions, 0 deletions
| @@ -350,6 +350,38 @@ evaluate `(setq inverse-video t)' before you try the operation you think | |||
| 350 | will cause too much redrawing. This doesn't refresh the screen, so only | 350 | will cause too much redrawing. This doesn't refresh the screen, so only |
| 351 | newly drawn text is in inverse video. | 351 | newly drawn text is in inverse video. |
| 352 | 352 | ||
| 353 | The Emacs display code includes special debugging code, but it is | ||
| 354 | normally disabled. You can enable it by building Emacs with the | ||
| 355 | pre-processing symbol GLYPH_DEBUG defined. Here's one easy way, | ||
| 356 | suitable for Unix and GNU systems, to build such a debugging version: | ||
| 357 | |||
| 358 | MYCPPFLAGS='-DGLYPH_DEBUG=1' make | ||
| 359 | |||
| 360 | Building Emacs like that activates many assertions which scrutinize | ||
| 361 | display code operation more than Emacs does normally. (To see the | ||
| 362 | code which tests these assertions, look for calls to the `xassert' | ||
| 363 | macros.) Any assertion that is reported to fail should be | ||
| 364 | investigated. | ||
| 365 | |||
| 366 | Building with GLYPH_DEBUG defined also defines several helper | ||
| 367 | functions which can help debugging display code. One such function is | ||
| 368 | `dump_glyph_matrix'. If you run Emacs under GDB, you can print the | ||
| 369 | contents of any glyph matrix by just calling that function with the | ||
| 370 | matrix as its argument. For example, the following command will print | ||
| 371 | the 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 | ||
| 377 | a long form.) You can dump the selected window's current glyph matrix | ||
| 378 | interactively with "M-x dump-glyph-matrix RET"; see the documentation | ||
| 379 | of this function for more details. | ||
| 380 | |||
| 381 | Several more functions for debugging display code are available in | ||
| 382 | Emacs 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 | ||