all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Perry Smith <pedz@easesoftware.com>
Cc: help-gnu-emacs@gnu.org, emacs-devel@gnu.org
Subject: Re: How to debug hang?
Date: Fri, 17 Nov 2006 22:13:33 -0600	[thread overview]
Message-ID: <F50DE345-5C80-4C46-8FA0-23C0E7CD328B@easesoftware.com> (raw)
In-Reply-To: <87irhdcvt8.fsf@pereiro.luannocracy.com>


[-- Attachment #1.1: Type: text/plain, Size: 1783 bytes --]

On Nov 17, 2006, at 8:50 PM, David Abrahams wrote:

>
> Hi,
>
> I'm trying to debug some kind of a hang that occurs when I try to use
> a font-lock mode I'm developing.  I can't get control back by hitting
> `C-g'.  I suspected it was a bad (combinatoric) regexp, but I added
> advice before and after re-search-forward that emitted enter/exit
> messages, and when the hang occurs I am seeing an exit message, so I'm
> guessing that's not it.  I'm quite stumped now; hoping someone can
> offer a clue.

Check out debug-on-quit.  If that doesn't work, try debug-on-signal  
and then kill the emacs from a separate window.  I'm not sure what  
that will do to your context.

There is also debug-on-entry if you have a routine that is called  
during the hang but it doesn't sounds like you do.

The other thing you might try is run emacs from a "terminal" (xterm  
or similar).  It use to be that emacs would hook the quit signal to  
control-g would actually generate a quit unix signal so it happened  
immediately (via the tty code that I so know and love :-) and not via  
some polling process.  Its been a long time since I've used it and I  
don't know if it is still hooked up that way or not.

But, while that might get you into the debugger, usually I'm too lost  
to figure out why it is hanging, what is looping, why is it not  
finishing, etc.

There is a message facility that might help too -- good ole printf  
debug technology.  (The function is called "message".)  It puts lines  
into the ever present *Messages* buffer.  So, if you ever do get  
control back, you can see what happened.

Good luck.

Perry Smith ( pedz@easesoftware.com )
Ease Software, Inc. ( http://www.easesoftware.com )

Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems



[-- Attachment #1.2: Type: text/html, Size: 6872 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

  reply	other threads:[~2006-11-18  4:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-18  2:50 How to debug hang? David Abrahams
2006-11-18  4:13 ` Perry Smith [this message]
2006-11-18 18:23   ` David Abrahams
     [not found] ` <mailman.776.1163823268.2155.help-gnu-emacs@gnu.org>
2006-11-18  6:37   ` Tim X
2006-11-18  8:58 ` martin rudalics
2006-11-18  9:04   ` Ralf Angeli
     [not found]   ` <mailman.781.1163841008.2155.help-gnu-emacs@gnu.org>
2006-11-19 19:32     ` Stefan Monnier
2006-11-18 10:37 ` Eli Zaretskii
2006-11-21 20:11   ` David Abrahams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F50DE345-5C80-4C46-8FA0-23C0E7CD328B@easesoftware.com \
    --to=pedz@easesoftware.com \
    --cc=emacs-devel@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.