home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / vmsnet / internal / 1116 < prev    next >
Encoding:
Internet Message Format  |  1992-07-25  |  1.7 KB

  1. Xref: sparky vmsnet.internals:1116 comp.os.vms:12770
  2. Path: sparky!uunet!gatech!purdue!hsdndev!marby
  3. From: marby@laura.harvard.edu (Craig Marby)
  4. Newsgroups: vmsnet.internals,comp.os.vms
  5. Subject: How can I determine if running under debugger?
  6. Message-ID: <MARBY.92Jul24152309@laura.harvard.edu>
  7. Date: 24 Jul 92 19:23:09 GMT
  8. Sender: usenet@hsdndev.UUCP
  9. Followup-To: vmsnet.internals
  10. Organization: Chemistry Dept., Harvard University
  11. Lines: 30
  12.  
  13. Is it possible to determine if the debugger has been invoked during
  14. the execution of a program? Ideally I would like to know if the
  15. program was started with the debugger, but it would also be useful to
  16. know later on as well (ie signal SS$_DEBUG could be sent during
  17. execution).
  18.  
  19. I know about IHD$LNKDEBUG in the image header, but that's not enough
  20. information really as this can be circumvented by eg. RUN/NODEB. Also
  21. this requires reading the image itself -- which may be denied
  22. permission.
  23.  
  24. It seems to me the best way to get this information is to look at
  25. the exception handlers using the system service $SETEXV. When the VMS
  26. debugger has been invoked it sets the primary condition handler (so I
  27. understand). Can I use the address of the primary condition handler to
  28. work out if this is the debugger or Fortran's handler or C's handler
  29. etc.? How can I work out what the address of the debuggers primary
  30. handler is? Is it a fixed value from activation to activation?
  31.  
  32. Another possibility that crossed my mind is that there may be logical
  33. names DBG$* which I could use as a check, but DBG$INPUT and DBG$OUTPUT
  34. don't seem to be much help.
  35.  
  36. Thanks in advance for any ideas.
  37. --
  38.  
  39.     __o         
  40.   _ \<,_       Craig A. Marby    marby@layla.harvard.edu
  41.  (_)/ (_)      
  42. ~~~~~~~~~~
  43.