diff options
| author | Eli Zaretskii | 2014-10-22 18:19:44 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2014-10-22 18:19:44 +0300 |
| commit | 97be2b8848dab2e460922fe182a5e1d8d40dcdde (patch) | |
| tree | d917ff4744fcf6725a3f8c05c860c8d6b7c03d7f /etc | |
| parent | be603ee9b653b14f62bb1bbcc6bded35e76f3ee7 (diff) | |
| download | emacs-97be2b8848dab2e460922fe182a5e1d8d40dcdde.tar.gz emacs-97be2b8848dab2e460922fe182a5e1d8d40dcdde.zip | |
etc/DEBUG: Improve instructions for debugging infinite loops.
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/DEBUG | 19 |
1 files changed, 12 insertions, 7 deletions
| @@ -398,9 +398,13 @@ to start debugging. | |||
| 398 | Don't assume Emacs is `hung'--it may instead be in an infinite loop. | 398 | Don't assume Emacs is `hung'--it may instead be in an infinite loop. |
| 399 | To find out which, make the problem happen under GDB and stop Emacs | 399 | To find out which, make the problem happen under GDB and stop Emacs |
| 400 | once it is not responding. (If Emacs is using X Windows directly, you | 400 | once it is not responding. (If Emacs is using X Windows directly, you |
| 401 | can stop Emacs by typing C-z at the GDB job.) Then try stepping with | 401 | can stop Emacs by typing C-z at the GDB job. On MS-Windows, run Emacs |
| 402 | `step'. If Emacs is hung, the `step' command won't return. If it is | 402 | as usual, and then attach GDB to it -- that will usually interrupt |
| 403 | looping, `step' will return. | 403 | whatever Emacs is doing and let you perform the steps described |
| 404 | below.) | ||
| 405 | |||
| 406 | Then try stepping with `step'. If Emacs is hung, the `step' command | ||
| 407 | won't return. If it is looping, `step' will return. | ||
| 404 | 408 | ||
| 405 | If this shows Emacs is hung in a system call, stop it again and | 409 | If this shows Emacs is hung in a system call, stop it again and |
| 406 | examine the arguments of the call. If you report the bug, it is very | 410 | examine the arguments of the call. If you report the bug, it is very |
| @@ -420,10 +424,11 @@ stepping, you will see where the loop starts and ends. Also, examine | |||
| 420 | the data being used in the loop and try to determine why the loop does | 424 | the data being used in the loop and try to determine why the loop does |
| 421 | not exit when it should. | 425 | not exit when it should. |
| 422 | 426 | ||
| 423 | You can also trying sending Emacs SIGUSR2, which, if `debug-on-event' | 427 | On GNU and Unix systems, you can also trying sending Emacs SIGUSR2, |
| 424 | has its default value, will cause Emacs to attempt to break it out of | 428 | which, if `debug-on-event' has its default value, will cause Emacs to |
| 425 | its current loop and into the Lisp debugger. This feature is useful | 429 | attempt to break it out of its current loop and into the Lisp |
| 426 | when a C-level debugger is not conveniently available. | 430 | debugger. This feature is useful when a C-level debugger is not |
| 431 | conveniently available. | ||
| 427 | 432 | ||
| 428 | ** If certain operations in Emacs are slower than they used to be, here | 433 | ** If certain operations in Emacs are slower than they used to be, here |
| 429 | is some advice for how to find out why. | 434 | is some advice for how to find out why. |