delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/01/21/14:26:04

Date: Sun, 21 Jan 2001 21:22:35 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
Message-Id: <4634-Sun21Jan2001212234+0200-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6
CC: djgpp-workers AT delorie DOT com
In-reply-to: <NEBBIOJNGMKPNOBKHCGHMEOICAAA.tim.van.holder@pandora.be>
Subject: Re: Interaction between __dpmi_yield and signals?
References: <NEBBIOJNGMKPNOBKHCGHMEOICAAA DOT tim DOT van DOT holder AT pandora DOT be>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
> Date: Sun, 21 Jan 2001 19:09:07 +0100
> 
> > Please show the code which sets up the timer and the signal handler.
> Seems to be this:
> 
> void
> signalAfter(deltaMilli, func)
>      int deltaMilli;
>      RETSIGTYPE (*func)();

This looks okay, but where is the signal handler, the one whose name
is passed to signalAfter in the func argument?

> No, was foreground all the time.
> I did check the libc manual, Eli ;-P

I didn't even remember I wrote this in libc.info ;-)

> > OK. But since we're dealing with an interpreted language, I figured trying
> > to debug something would prove difficult even without the timer stuff.
> > Why?  I routinely run Emacs (another interpreter) under GDB with no
> > visible problems.  I even debug GDB itself with GDB, although it has a
> > command-line interpreter built into it.
> My bad - since it's byte-compiled, there's no problem stepping through the
> routines that ibnterpret those bytecodes; somehow I thought I'd be stepping
> through machine code that had been generated at run-time (which wouldn't
> have debug info).
> I'll build a stabbed version later and see what the debugger says.

I actually think that running the SIGALRM code under a debugger is not
a good idea, as I wrote earlier, because it causes some strange
interference with the debugger.  But if the main Smalltalk program
rarely or never uses timers, you can run it inside GDB.

In any case, if you do run the timer code under GDB, don't forget to
say "handle SIGALRM noprint nostop".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019