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