Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!hc!beta!unm-la!unmvax!nmtsun!hydrovax From: hydrovax@nmtsun.nmt.edu (M. Warner Losh) Newsgroups: comp.os.vms Subject: Re: Debugger with ANALYZE/PROCESS and detached processes Message-ID: <1221@nmtsun.nmt.edu> Date: 11 Jan 88 19:25:08 GMT References: <8801091650.AA08255@ucbvax.Berkeley.EDU> Organization: NMT Hydrology program Lines: 49 Summary: Want to bet... In article <8801091650.AA08255@ucbvax.Berkeley.EDU>, RSD1901@TAMSIGMA.BITNET (Shane Davis) writes: > I'm working on a program in VAX C which will be run as a detached process. > Right now it's running as a subprocess, but regardless it is started with > the /DUMP qualifier, which causes a process dump to be created if an exception > occurs which causes abnormal image exit. I can use ANALYZE/PROCESS_DUMP to > find out what exception occurred, but no symbols or source is available when > the debugger is invoked. I cannot LINK the object module with /DEBUG because > then the image cannot be run detached. > But you can run detached processes that are linked with the /DEBUG option. There are even TWO WAYS of doing so: i) RUN/NODEBUG/etc Which gives you symbols when the debugger gets invoked (I THINK). ii) DEFINE DBG$INPUT "_TXan:"/GROUP DEFINE DBG$OUTPUT "_TXan:"/GROUP where TXan: is the terminal you wish to use for debugging. A few restrictions apply here: 1) No one else in your group can use the debugger. 2) You MUST be in the same group as the detached process. You can get around 2) by not allowing ANYBODY ELSE ON THE WHOLE SYSTEM to use the debugger by replacing the /GROUP with /SYSTEM. I don't think that you can get around 1) except by doing something like RUN/INPUT=SOME-FILE.COM/etc SYS$SYSTEM:LOGINOUT and having some-file.com look like: $ $ DEFINE DBG$INPUT terminal-name $ DEFINE DBG$OUTPUT terminal-name $ RUN/DEBUG program. $ This is MUCH MUCH better than having to deal with CORE dumps. I found all of this info (at least the DBG$ stuff defined /group) in the SYSTEM SERVICES manual Volume 8A. Utility Routines. pg. PSM-17. These pages are from a 4.4 doc set, so if you are running a higher version (higher than 4.5 which has the same doc set) then they may be in a different place. I discovered this trick while trying to write my own PSM (Print SyMbiot), so look in that section of the manual. -- bitnet: lush@nmt.csnet M. Warner Losh csnet: warner%hydrovax@nmtsun uucp: ...{cmcl2, ihnp4}!lanl!unmvax!nmtsun!warner%hydrovax ...{cmcl2, ihnp4}!lanl!unmvax!nmtsun!hydrovax Warning: Hydrovax is both a machine, and an account, so be careful.