kevin@amdahl.uts.amdahl.com (Kevin Clague) (06/21/88)
[] I have a program that is going into an infinte loop. I can't recreate it on demand, so it is really hard to shoot. I also don't know where the code is stuck. Can I write a program that will look into another tasks stack and find out what the current PC is? Since my query program is running at the time it is trying to query the hung's program's stack, it must be ready to run, so I presume a timer interrupt took the processor away from my infinite loop program. I know the address of the task's structure. Can I simply define a structure that looks like a 68000 (or 680x0) stack frame, get the stack pointer from the task structure, and use it as a pointer to the the structure? Since the stack pointer is pointing to the next available entry on the stack, I'll have to subtract the size of the stack frame from from the pointer to get a pointer to the beginning of the interrupt frame. Is this the right approach? If I get it working does anyone else want a copy of it? -kevin -- UUCP: kevin@amdahl.amdahl.com or: {sun,decwrl,hplabs,pyramid,ihnp4,seismo,oliveb,cbosgd}!amdahl!kevin DDD: 408-737-5481 USPS: Amdahl Corp. M/S 249, 1250 E. Arques Av, Sunnyvale, CA 94086 [ Any thoughts or opinions which may or may not have been expressed ] [ herein are my own. They are not necessarily those of my employer. ]