home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!sol.ctr.columbia.edu!ucselx!network.ucsd.edu!mvb.saic.com!macro32
- From: SCHENKENBERG@Monmouth-ETDL1.Army.MIL
- Newsgroups: vmsnet.internals
- Subject: Re: STACK LAYOUT IN SPECIAL KAST?
- Message-ID: <01GO49J2622O94DPOJ@MONMOUTH-etdl1.Army.MIL>
- Date: Fri, 28 Aug 1992 14:25 EDT
- Organization: Macro32<==>Vmsnet.Internals Gateway
- X-Gateway-Source-Info: Mailing List
- Lines: 27
-
- >> I'm hacking some code to watch a process, and I want to see which procedures
- >> it's been calling. Basically I send an IPL2 KAST to the process when it's
- >> CUR from some code on the timer queue, and I intend the KAST code to check
- >> previous call frames to find the saved PC.
- >>
- >> When I'm in the KAST how can I find the saved PC, PSL and FP of the code
- >> I've interrupted, so that I can trace back through the stack.
-
- I'm not sure of what you mean by a KAST? I Special Kernel AST or an AST run-
- ning at KERNEL access mode?
-
- If its a special Kernel AST, the ast routine is not invoked in the same fashion
- as a normal AST. A SKAST is called thru a JSB a normal AST thru a CALLG.
-
- In a normal AST the AP will point to 5 arguments. The saved R0, R1, PC and the
- PSL, along with, the optional AST parameter (if one was specified.) You should
- be able to walk back the call frames from the current FP to get the info you
- want.
-
- Th SKAST is different. The delivery of the AST routine is accomplish thru a
- JSB instruction. The AST delivery routine places the address of the target
- processes PCB in R4 and the address of the ACB in R5. You should be able to
- access the data you want from these structures. The SKAST runs at ipl 2,
- disabling the delivery of other ast's until it RSB's back, and should provide
- enough synchronization to the structures you want to read information from.
-
- BJS-
-