Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #32750

Re: What for Break Key No Work?

From rickman <gnuarm@gmail.com>
Newsgroups comp.lang.forth
Subject Re: What for Break Key No Work?
Date 2014-07-28 14:30 -0400
Organization A noiseless patient Spider
Message-ID <lr64rn$uan$1@dont-email.me> (permalink)
References (8 earlier) <2014Jul27.150857@mips.complang.tuwien.ac.at> <lr3nrk$bcb$1@dont-email.me> <2014Jul28.140927@mips.complang.tuwien.ac.at> <lr5ns2$igh$1@dont-email.me> <2014Jul28.172934@mips.complang.tuwien.ac.at>

Show all headers | View raw


On 7/28/2014 11:29 AM, Anton Ertl wrote:
> rickman <gnuarm@gmail.com> writes:
>> On 7/28/2014 8:09 AM, Anton Ertl wrote:
>>> For the data and return stacks, it uses dedicated memory space,
>>> because it does not know where the data and return stack pointers of
>>> the engine point to, anyway.  Later, THROW sets these stack pointers
>>> to the values they had when the innermost CATCH was called.
>>
>> Why would the signal handler not know this?  It should be running in the
>> same context.  The data and return stacks are just register values which
>> should be the same as in the user code, no?  If not, what values do the
>> registers have, arbitrary?
>
> The data and return stack pointers are local variables of the engine()
> function; they may reside in registers or in the C stack while
> engine() is running.  When a signal handler is called, the register
> values of the interrupted code are stored in a structure (that is
> passed as parameter to the signal handler function).  Unfortunately,
> there is no portable way to know where these local variables are
> stored.  So while in principle the signal handler has access to this
> information, in practice it doesn't (at least not for the amount of
> nonportability we are prepared to deal with).

Ok, that makes some sense except what portability issues?  Are you 
saying the way the signal handler access this info depends on the OS 
this is running under?  What are you porting to?


> Fortunately, we don't need that, because THROW resets the stack
> pointers to the values at the innermost CATCH anyway.  (Actually, the
> stack pointers would be nice for debugging, and our debugging engine
> keeps the return stack pointer in a global variable, which can be
> accessed from any C function, at a cost in performance).
>
> If you do an implementation in assembly language (or a native-code
> compiler), things are different: You know exactly where the stack
> pointers reside, and you are probably prepared to find out where the
> OS stores the particular registers you are interested in.

OS?  What OS?  In the stuff I am doing the OS *is* Forth, lol.

-- 

Rick

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

What for Break Key No Work? Jason Damisch <jasondamisch@yahoo.com> - 2014-07-22 14:44 -0700
  Re: What for Break Key No Work? Roger Levy <roger.levy@gmail.com> - 2014-07-22 14:50 -0700
    Re: What for Break Key No Work? Jason Damisch <jasondamisch@yahoo.com> - 2014-07-22 15:04 -0700
      Re: What for Break Key No Work? Jason Damisch <jasondamisch@yahoo.com> - 2014-07-22 16:03 -0700
      Re: What for Break Key No Work? BruceMcF <agila61@netscape.net> - 2014-07-22 18:34 -0700
        Re: What for Break Key No Work? Jason Damisch <jasondamisch@yahoo.com> - 2014-07-22 19:32 -0700
          Re: What for Break Key No Work? Spam@ControlQ.com - 2014-07-22 22:43 -0400
            Re: What for Break Key No Work? Jason Damisch <jasondamisch@yahoo.com> - 2014-07-23 09:57 -0700
              Re: What for Break Key No Work? "Elizabeth D. Rather" <erather@forth.com> - 2014-07-23 07:12 -1000
                Re: What for Break Key No Work? Jason Damisch <jasondamisch@yahoo.com> - 2014-07-23 10:15 -0700
          Re: What for Break Key No Work? rickman <gnuarm@gmail.com> - 2014-07-22 22:44 -0400
            Re: What for Break Key No Work? Jason Damisch <jasondamisch@yahoo.com> - 2014-07-23 09:58 -0700
              Re: What for Break Key No Work? "Elizabeth D. Rather" <erather@forth.com> - 2014-07-23 21:28 -1000
          Re: What for Break Key No Work? BruceMcF <agila61@netscape.net> - 2014-07-23 13:12 -0700
            Re: What for Break Key No Work? Jason Damisch <jasondamisch@yahoo.com> - 2014-07-23 14:52 -0700
              Re: What for Break Key No Work? Mark Wills <markwills1970@gmail.com> - 2014-07-24 01:54 -0700
                Re: What for Break Key No Work? rickman <gnuarm@gmail.com> - 2014-07-24 07:54 -0400
                Re: What for Break Key No Work? Mark Wills <markwills1970@gmail.com> - 2014-07-24 06:49 -0700
                Re: What for Break Key No Work? rickman <gnuarm@gmail.com> - 2014-07-24 10:39 -0400
                Re: What for Break Key No Work? bruce.mcfarling@gmail.com - 2014-07-24 08:52 -0700
                Re: What for Break Key No Work? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-07-24 13:07 -0500
                Re: What for Break Key No Work? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-07-25 10:50 +0000
                Re: What for Break Key No Work? Bernd Paysan <bernd.paysan@gmx.de> - 2014-07-25 14:38 +0200
                Re: What for Break Key No Work? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-07-25 17:07 +0000
                Re: What for Break Key No Work? Bernd Paysan <bernd.paysan@gmx.de> - 2014-07-26 00:36 +0200
                Re: What for Break Key No Work? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-07-27 13:47 +0000
                Re: What for Break Key No Work? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-07-25 09:21 -0500
                Re: What for Break Key No Work? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-07-25 17:10 +0000
                Re: What for Break Key No Work? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-07-26 04:38 -0500
                Re: What for Break Key No Work? Bernd Paysan <bernd.paysan@gmx.de> - 2014-07-26 15:56 +0200
                Re: What for Break Key No Work? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-07-27 13:27 +0000
                Re: What for Break Key No Work? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-07-27 09:36 -0500
                Re: What for Break Key No Work? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-07-28 11:38 +0000
                Re: What for Break Key No Work? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-07-28 10:42 -0500
                Re: What for Break Key No Work? "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-07-25 16:56 -0400
                Re: What for Break Key No Work? "Elizabeth D. Rather" <erather@forth.com> - 2014-07-26 09:33 +0000
                Re: What for Break Key No Work? rickman <gnuarm@gmail.com> - 2014-07-24 19:40 -0400
                Re: What for Break Key No Work? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-07-25 00:00 +0000
                Re: What for Break Key No Work? rickman <gnuarm@gmail.com> - 2014-07-24 22:17 -0400
                Re: What for Break Key No Work? bruce.mcfarling@gmail.com - 2014-07-25 06:54 -0700
                Re: What for Break Key No Work? "Elizabeth D. Rather" <erather@forth.com> - 2014-07-25 13:13 -0400
                Re: What for Break Key No Work? rickman <gnuarm@gmail.com> - 2014-07-25 13:24 -0400
                Re: What for Break Key No Work? bruce.mcfarling@gmail.com - 2014-07-25 14:37 -0700
                Re: What for Break Key No Work? rickman <gnuarm@gmail.com> - 2014-07-25 19:01 -0400
                Re: What for Break Key No Work? bruce.mcfarling@gmail.com - 2014-07-25 16:20 -0700
                Re: What for Break Key No Work? rickman <gnuarm@gmail.com> - 2014-07-25 22:02 -0400
                Re: What for Break Key No Work? rickman <gnuarm@gmail.com> - 2014-07-25 22:17 -0400
                Re: What for Break Key No Work? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-07-26 09:09 +0000
                Re: What for Break Key No Work? rickman <gnuarm@gmail.com> - 2014-07-26 05:36 -0400
                Re: What for Break Key No Work? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-07-26 04:41 -0500
                Re: What for Break Key No Work? rickman <gnuarm@gmail.com> - 2014-07-26 22:50 -0400
                Re: What for Break Key No Work? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-07-27 02:49 -0500
                Re: What for Break Key No Work? rickman <gnuarm@gmail.com> - 2014-07-27 15:08 -0400
                Re: What for Break Key No Work? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-07-27 14:11 -0500
                Re: What for Break Key No Work? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-07-28 12:00 +0000
                Re: What for Break Key No Work? rickman <gnuarm@gmail.com> - 2014-07-28 10:41 -0400
                Re: What for Break Key No Work? Bernd Paysan <bernd.paysan@gmx.de> - 2014-07-27 14:31 +0200
                Re: What for Break Key No Work? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-07-27 13:08 +0000
                Re: What for Break Key No Work? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-07-27 19:37 +0000
                Re: What for Break Key No Work? rickman <gnuarm@gmail.com> - 2014-07-27 16:35 -0400
                Re: What for Break Key No Work? "Elizabeth D. Rather" <erather@forth.com> - 2014-07-27 22:24 +0000
                Re: What for Break Key No Work? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-07-28 13:14 +0000
                Re: What for Break Key No Work? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-07-28 03:41 -0500
                Re: What for Break Key No Work? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-07-28 12:09 +0000
                Re: What for Break Key No Work? rickman <gnuarm@gmail.com> - 2014-07-28 10:48 -0400
                Re: What for Break Key No Work? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-07-28 15:29 +0000
                Re: What for Break Key No Work? rickman <gnuarm@gmail.com> - 2014-07-28 14:30 -0400
                Re: What for Break Key No Work? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-07-29 08:12 +0000
                Re: What for Break Key No Work? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-07-28 13:10 +0000
                Re: What for Break Key No Work? bruce.mcfarling@gmail.com - 2014-07-27 11:33 -0700
                Re: What for Break Key No Work? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-07-28 11:55 +0000
                Re: What for Break Key No Work? "Alex McDonald" <blog@rivadpm.com> - 2014-07-28 14:03 +0100
                Re: What for Break Key No Work? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-07-27 13:02 +0000
                Re: What for Break Key No Work? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-07-26 08:57 +0000
                Re: What for Break Key No Work? rickman <gnuarm@gmail.com> - 2014-07-26 05:05 -0400
                Re: What for Break Key No Work? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-07-26 09:20 +0000
            Re: What for Break Key No Work? "Alex McDonald" <blog@rivadpm.com> - 2014-07-23 23:48 +0100
            Re: What for Break Key No Work? rickman <gnuarm@gmail.com> - 2014-07-24 04:53 -0400
              Re: What for Break Key No Work? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-07-24 10:59 +0000
                Re: What for Break Key No Work? mhx@iae.nl - 2014-07-24 04:23 -0700
          Re: What for Break Key No Work? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-07-24 19:28 +0000
            Re: What for Break Key No Work? "Elizabeth D. Rather" <erather@forth.com> - 2014-07-24 13:01 -1000
              Re: What for Break Key No Work? Roelf Toxopeus <rt4all@notthis.hetnet.nl> - 2014-07-25 10:13 +0200
      Re: What for Break Key No Work? "Elizabeth D. Rather" <erather@forth.com> - 2014-07-22 17:11 -1000
        Re: What for Break Key No Work? Jason Damisch <jasondamisch@yahoo.com> - 2014-07-23 09:59 -0700
  Re: What for Break Key No Work? David Schultz <abuse@127.0.0.1> - 2014-07-22 17:47 -0500
    Re: What for Break Key No Work? rickman <gnuarm@gmail.com> - 2014-07-22 19:12 -0400
      Re: What for Break Key No Work? Jason Damisch <jasondamisch@yahoo.com> - 2014-07-22 16:21 -0700
        Re: What for Break Key No Work? rickman <gnuarm@gmail.com> - 2014-07-22 22:51 -0400
  Re: What for Break Key No Work? Matthias Trute <matthias.trute@gmail.com> - 2014-07-23 02:18 -0700
  Re: What for Break Key No Work? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-07-23 13:21 +0000
    Re: What for Break Key No Work? Jason Damisch <jasondamisch@yahoo.com> - 2014-07-23 10:02 -0700
    Re: What for Break Key No Work? Bernd Paysan <bernd.paysan@gmx.de> - 2014-07-24 04:10 +0200
  Re: What for Break Key No Work? mhx@iae.nl - 2014-07-23 13:45 -0700
  Re: What for Break Key No Work? BruceMcF <agila61@netscape.net> - 2014-07-23 16:37 -0700
  Re: What for Break Key No Work? "Clyde W. Phillips Jr." <cwpjr02@gmail.com> - 2014-07-30 16:13 -0700
  Re: What for Break Key No Work? francois.ganza@wanadoo.fr - 2014-07-30 22:55 -0700

csiph-web