[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Debug lisp code
From: |
David Kastrup |
Subject: |
Re: Debug lisp code |
Date: |
Tue, 30 Aug 2005 08:44:08 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Michael Cadilhac <michael.cadilhac-@t-lrde.epita.fr> writes:
> David Kastrup <dak@gnu.org> writes:
>
>> Michael Cadilhac <michael.cadilhac-@t-lrde.epita.fr> writes:
>>
>>> 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 ?
Did you actually read what I wrote above? Bind inhibit-quit to nil in
the function, and it will be interruptible.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum