O .-----------------------------------------------------------------------------. O | Copyright  1996 by Brian Schenkenberger.  ALL RIGHTS RESERVED.             | O |                                                                             | O | This software is provided "AS IS" and is supplied for informational purpose | O | only.  No warranty is expressed or implied and no liability can be accepted | O | for any actions or circumstances incurred from the use of this software or  | O | from the information contained herein.  The author makes no claim as to the | O | suitablility or fitness of the software or information contain herein for a | O | particular purpose.                                                         | O |                                                                             | O | Permission is hereby granted _ONLY_ for the "not-for-profit" redistribution | O | of this software provided that ALL SOURCE and/or OBJECT CODE remains intact | O | and ALL COPYRIGHT NOTICES remain intact from its original distribution.     | O |                                                                             | O |(!) NO TITLE TO AND/OR OWNERSHIP OF THIS SOFTWARE IS HEREBY TRANSFERRED. (!) | O `-----------------------------------------------------------------------------'      Package name:   DBG_SHELL F Description:    Demonstration showing how to use the OpenVMS debugging8 		interface for writing a debugger, as well as, a useful8 		utility for use during the software development phase.$ Author's name:  Brian Schenkenberger     Package Overview:  ----------------G This program is an extrapolation of a short ditty which I posted to the H DECuserve VMS Notes Conference (VMS Conference note 2630).  The originalH program was devised as a means to run a program which was linked /DEBUG H and activated as a foreign command or via a CLD command definition with-H out mapping the debugger.  The originally posted program merely created G a debug shareable image which simply returned, immediately, to the main H program image.  The no debug debugger is invoked by defining the OpenVMSC logical LIB$DEBUG to the full file spcification of the debug image.   H This program is a modification on the original theme.  This program willK provide the same no debug functionality as the originally posted program.   H In addition, it can also be made to map the OpenVMS symbolic debugger byH simply defining a logical within the environment of the running program.H Additionally, the user may select the DELTA debugger or another debugger6 simply by specifying the debugger via another logical.   --   Build: (Both VAX and Alpha)     	 $ MACRO DBG_SHELL.MAR . 	 $ LINK/SHAREABLE DBG_SHELL.OBJ,SYS$INPUT/OPT 	   cluster=DEFAULT_CLUSTER ( 	   collect=DEFAULT_CLUSTER,$$$dbg_shell  H * Note:	A DESCRIP.MMS file is provided to build the DBG_SHELL executableC 	and several sample "Hello World!" programs in some of the author's J         favorite programming languages such as:  Macro, Bliss and Fortran.A 	A "C" language version is also included in spite of the author's $ 	disdain of this abhorring language.   --      Usage:  G To use the DBG_SHELL, define the OpenVMS logical LIB$DEBUG to the full  / file specification for the DBG_SHELL.EXE image.   G For example, let's suppose that the DBG_SHELL.EXE image was built using G the above build sequence and then, placed into the directory denoted by G the logical SYS$SHARE.  To use DBG_SHELL, define the logical LIB$DEBUG   to SYS$SHARE:DBG_SHELL.EXE.    F Now, any program linked /DEBUG can be run without invoking the OpenVMSF debugger.  By defining the logical DBG_SHELL$ENABLE, the DBG_SHELL.EXEF image will map and invoke the OpenVMS symbolic debugger when a program that was linked /DEBUG is run.  F Use of an alternate debugger may be specified by defining the logical F DBG_SHELL$SELECT to the file specification of the debugger.  DBG_SHELLE applies the default file specification of SYS$SHARE:.EXE to any debug D specification unless the logical translates to a full specification.  F For example:  To run your program and have the DELTA debugger mapped, # simply issue the following defines:    	$ DEFINE DBG_SHELL$ENABLE TRUE   	$ DEFINE DBG_SHELL$SELECT DELTA    D * Note:	The actual value from translation of DBG_SHELL$ENABLE is not< 	important.  The presense or absense of the logical controls1 	the enabling or disabling feature, respectfully.   F * Note: Defining DBG_SHELL$SELECT to the specification of DBG_SHELL is@ 	checked by DBG_SHELL to insure that DBG_SHELL does not become a> 	great way to waste CPU cycles and exercise the $IMGACT system 	service.  	   .END. 