crash@ckctpa.UUCP (Frank J. Edwards) (10/28/90)
I listened (read) with interest the recent discussion of tc_Switch in the Task structure since I thought this would be ideal for writing my own profiling code. Now, a few weeks later, I realized that one thing wasn't mentioned: details on the stack frame. Is there some (easy) way to know where the Program Counter is within the task? How does this code get executed, in User state or Supervisor state? The RKM's don't seem to discuss this much. I have thought of another application, however. Too often (and I do mean "too" often :-) I find that my code goes into an infinite loop while debugging it. There's no way to stop this task, especially since Xoper "kill" function locks up tasks under 2.0; I figured on checking the SIG_CTRL_C bit at every inbound (maybe outbound?) task switch and forcing the Program Counter to be a particular address using something like setjmp/longjmp, but more crude -- just useful enough to stop the task. Thanks. ---- Frank J. Edwards | //|| "I have made up my mind -- there Edwards and Edwards Consulting | //_|| simply WASN'T any other choice!" Phone: (813) 786-3675 | _// ||_ (Amigans do it with Intuition.) "An Amiga3000 with 4MB of SCRAM and 2MB of CHIP... Glorious!"