unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Michael Cadilhac <michael.cadilhac-@t-lrde.epita.fr>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Debug lisp code
Date: Tue, 30 Aug 2005 03:35:33 +0200	[thread overview]
Message-ID: <87wtm4kxzu.fsf@t-lrde.epita.fr> (raw)
In-Reply-To: <85y86ka8w3.fsf@lola.goethe.zz> (David Kastrup's message of "Mon, 29 Aug 2005 20:35:40 +0200")

David Kastrup <dak@gnu.org> writes:

> Michael Cadilhac <michael.cadilhac-@t-lrde.epita.fr> writes:
>
>>   Hi !
>>
>>   I've some kind of a freeze  in a function being a process filter. My
>>   problem is  that I can't figure  out where the infinite  loop is and
>>   it's a random thing, so I can't use debug-on-entry.
>>
>>   This function not being called by the user, C-g is not canceling it,
>>   so set debug-on-quit to t is useless.
>>
>>   So, is there a way to debug things like
>>   (run-with-idle-timer 1 nil (lambda () (while t)))
>>   ?
>
> (run-with-idle-timer 1 nil (lambda nil (let (inhibit-quit)
>   (while t))))

  Maybe I wasn't clear enough :-)

  Let's say I have a function runed with `run-with-idle-timer'. This
  function has an infinite loop somewhere in it.

  Now,  this  function  is  called,  asynchronously.  The  call  being
  asynchronous, I don't  know how I can stop this  function and have a
  backtrace, in order to know where the infinite loop is.

  I mean... with (run-with-idle-timer 1 nil (lambda () (while t))),
  how do you unblock emacs ?

  Thanks.

-- 
    Michael Cadilhac, a.k.a. Micha [mika] |
                    Epita/LRDE promo 2007 |  Please note that you should
  2 rue de la Convention | 01.46.70.90.75 |  s/-@t-/@/ my mail address.
94270 Le Kremlin Bicetre | 06.23.20.31.30 |

  reply	other threads:[~2005-08-30  1:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.5387.1125339939.20277.help-gnu-emacs@gnu.org>
2005-08-29 18:35 ` Debug lisp code David Kastrup
2005-08-30  1:35   ` Michael Cadilhac [this message]
     [not found]   ` <mailman.5426.1125363742.20277.help-gnu-emacs@gnu.org>
2005-08-30  6:44     ` David Kastrup
2005-08-30 11:15       ` Michael Cadilhac
2005-08-29 19:18 Michael Cadilhac

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87wtm4kxzu.fsf@t-lrde.epita.fr \
    --to=michael.cadilhac-@t-lrde.epita.fr \
    --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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).