From:	CSBVAX::MRGATE!info-vax-request@kl.sri.com@SMTP 15-MAY-1988 11:37
To:	ARISIA::EVERHART
Subj:	Re: CLI's and debuggers.


Received: from ucbvax.Berkeley.EDU by KL.SRI.COM with TCP; Tue 10 May 88 22:39:23-PDT
Received: by ucbvax.Berkeley.EDU (5.59/1.28)
	id AA03701; Tue, 10 May 88 20:30:44 PDT
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 8 May 88 07:59:15 GMT
From: munnari!gwydir!ccadfa!anucsd!bdm@uunet.uu.net  (Brendan McKay)
Organization: Computer Science, Australian National Uni, Canberra
Subject: Re: CLI's and debuggers.
Message-Id: <720@anucsd.oz>
References: <112rrk@byuvax.bitnet>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

In article <112rrk@byuvax.bitnet>, rrk@byuvax.bitnet writes:
> Also, has anyone seen any code (source preferably) which implements a VMS
> debugger (linked in via LINK/DEBUG=MYDEBUGGER)?  I would like to write a
> VMS code tracer/analyzer/debugger.  Thanks.

Below is a debugger that does nothing.  For some reason I can't remember,
I once wanted to be able to link/debug but then run as a foreign command
without the VMS debugger starting.  Something to do with the debugger
records in the .EXE file.   Anyway, to do something non-trivial, just
insert it before you transfer to the normal start address.

;---snip----snip----snip----------------------------------------

; This is a dummy debugger.  It simply gives immediate control to the
; user's program.   It was written by Brendan McKay using a program of
; Tom Allebrandi as a guide.

dummydeb:   .word   ^m<r2>          

            addl2   #4, 4(ap)       ; advance transfer vector array pointer
                                    ;    to point to user start address
            movl    @4(ap), r2      ; get user start address
            callg   (ap), (r2)      ; go there

            ret                     ; return to CLI

            .end    dummydeb
;---------------------------------------------------------------

Paper:     Computer Science Department, Australian National University,
           GPO Box 4, Canberra, ACT 2601, Australia.
Telephone: + 61 62 49 3845                Telex: AA 62760 NATUNI
ACSnet: bdm@anucsd.oz                     ARPA:  bdm%anucsd.oz@uunet.uu.net
CSNET:  bdm@anucsd.oz.australia           JANET: anucsd.oz!bdm@ukc
UUCP:   {uunet,ubc-cs,ukc,mcvax,prlb2,enea,mulga}!munnari!anucsd!bdm
BITNET:  munnari!anucsd.oz!bdm@uunet.uu.net (or similar)
Some mailers may need ".oz.au" instead of ".oz".
