Path: utzoo!yunexus!xrtll!rsnider From: rsnider@xrtll.UUCP (Richard Snider) Newsgroups: comp.os.minix Subject: Re: Trace System call for Minix Summary: interuppts will cause problems Message-ID: <234@xrtll.UUCP> Date: 7 Jan 89 18:44:51 GMT Article-I.D.: xrtll.234 References: <6255@louie.udel.EDU> Reply-To: rsnider@xrtll.UUCP (Richard Snider) Organization: ISOTECH Computer Industries, Toronto, Canada Lines: 41 In article <6255@louie.udel.EDU> jnall%FSU.BITNET@cunyvm.cuny.edu (John Nall 904-644-5241) writes: >how the operating system works if there were some sort of trace function >in Minix -- some way to "step through" the system. > >It occurs to me that this would not only be nice, it should not be very >hard to do. Essentially, a "trace" system call would be added, and the >student would use it at points where he needed to stop the world and look >at it. >Before I reinvent the wheel (or try to get a grad student to do it), has >anyone already done this? Or are there some real show stopping problems >that I'm just not seeing?? > >Thanks for the help. > >John Nall (jnall@rai.fsu.edu BITNET) The problem with allowing the system to "Stop" and then letting someone take some time to check things out is that Minix depends heavily on various interrupts happening to do such things as turn disk drives off, watch the keyboard, and process switching and servicing. The only approach that I can suggest is that you implement some sort of processor trap which saves the state of the machine in some known place (Maybe a special /dev type file) where you can read it out. Now this isn't exactally what I would call a Trace but it at least will give you some idea of what is going on at exactally that place in the code. The other approach I can see is to write some sort of processor emulator which when given the information about contents of registers and memory (at the present time) by some call as described above, it will then go on and appear to be the machine to the student so that they may single step it or change things and continue...etc. This of course is not perfect since you will have to save the values at all the device io address along with the processor state so that they may be referenced by the emulator. But since we are talking about a teaching tool here, it may be suffcient. Best of luck. Richard Snider ------------------------------------------------------------------------------- Where: ..uunet!mnetor!yunexus!xrtll!rsnider Also: rsnider@xrtll.UUCP "Hey ! Whats with all the blue lines on the RGB Monitor ???" "Ummm.....Looks like.....well....Ethernet!"