Subject: RE: Debugging on WinNT.

From: "Douglas Miles (Volt Computer)" <[email-masked]>
Date: Tue, 11 Jul 2000 13:25:08 -0700

If you suspect your app is getting held up in foreign code .. you may want
to try to
run you plwin or plcon under windbg.exe or ntsd.exe (or even under visual
c++ debugger)
these are debugging utilities usual found on NT systems or in the Windows
Resource kit.
This allows you to examine the stack and see what modules your processor was
busy with.

I have noticed when working with for example the socket libraries for SWI
(this may be the case in other parts like steams). When i getch on NT, i was
getching something different then on Linux.. So i had a program running
reliably on one platform becasue i had was testing for integers and not
charcodes.  My routine was always failing on NT as it was looping very
tightly and spending most of time inside getch code..  (less time to look
for me pressing control C evidently). You may need to double check to see if
your stream always returns is the same kinds of data on both platforms. 

-D

-----Original Message-----
From: Jan Wielemaker [mailto:[email-masked]]
Sent: Tuesday, July 11, 2000 11:53 AM
To: Martin Young; [email-masked]
Cc: [email-masked]
Subject: Re: Debugging on WinNT.

> 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

----------------
* To UNSUBSCRIBE, please use the HTML form at

    http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist

or send mail to [email-masked] using the Subject:
"unsubscribe"
(without the quotes) and *no* message body.

** An ARCHIVE of this list is maintained at

    http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/