Subject: Re: Debugging on WinNT.

From: Jan Wielemaker <[email-masked]>
Date: Tue, 11 Jul 2000 20:53:22 +0200

> I've written a Prolog program which runs correctly on Solaris and also on
> Windows NT for small data sets, but on Windows NT with a large amount of data
> it appears to hang.  It's generally doing stuff related to writing text to a
> stream but I'm not sure as I can't see how to break in to see what it's up to.
>  So, questions:
> 
>   - Are there any known problems or predicates I should be avoiding (I'm not
>     using signals, btw)?

Except from indeed signal handling, the Windows version should be fully
equivalent.  If you are using lots of memory (i.e. more than physically
available, the performance of NT drops down a lot faster than Solaris.

>   - How do I break in and see the current goals, as in ctrl/c under Solaris?
>     ctrl/c in plwin does nothing, whilst plcon says "FATAL ERROR...received
>     signal 2 (int) while in 20-th garbage collection".

This looks like a bug.  Signal handling is disabled while in garbage
collections, but appearently this doesn't work in Windows.  I don't know
what version we are talking about, but plwin-not-too-old should answer
Control-C.  It does so by the console thread setting a flag, which is
checked every few thousands passed through the call-port.  Normally this
should not take too long, unless it is doing a lot of work in foreign (C)
code.

>   - Is there some other way I can get some visibility on what's happening?

Good old format?  Switch on verbose garbage collection?  trace/1?

	Regards --- Jan