home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / vmsnet / internal / 1215 < prev    next >
Encoding:
Internet Message Format  |  1992-08-29  |  1.7 KB

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