[comp.os.vms] Traceback,notraceback

mike%udel-oitvax.arpa@UDEL.EDU.UUCP (06/28/87)

The following two files mark images with either NOTRACEBACK or TRACEBACK.
I have not tested them on V4.5 yet, but they should still work.

Obviously, converting a NOTRACEBACK image to a TRACEBACK image will not
get you the symbols (or, at least not with a simple program like this),
but it will let you run the image /DEBUG.

When VMS 4.0 was introduced, it was necessary to link all program /NOTRACE
if they were to be installed.  I believe this is why NO_TRACEBACK was
written.  I converted NO_TRACEBACK to TRACEBACK.
*---- NO_TRACEBACK.COM
$ ! This procedure converts a .EXE file linked TRACEBACK to NOTRACEBACK.
$ !
$ ! See the January 1985 VAX/VMS Systems Dispatch, pp. 33-35
$ !
$ patch /absolute /noout /nojou 'p1'
examine /word 2
define base = \
replace /long base
80000168
exit
80000168
exit
exit
$ if $status then goto patch_image
$ patch /absolute /noout /nojou 'p1'
examine /word 2
define base = \
replace /long base
7ffedf68
exit
7ffedf68
exit
exit
$ if $status then goto patch_image
$ exit
$ !
$patch_image:
$ patch /absolute /out='p1' /jou='p1' 'p1'
examine /word 2
define base = \
examine /long base+4
define contents = \
deposit /long base + 0 = contents
examine /long base+8
define contents = \
deposit /long base + 4 = contents
examine /long base+0c
define contents = \
deposit /long base + 8 = contents
update
exit
*---- TRACEBACK.COM
$ ! This procedure converts a .EXE file linked NOTRACEBACK to TRACEBACK.
$ !
$ ! See the January 1985 VAX/VMS Systems Dispatch, pp. 33-35
$ !
$patch_image:
$ patch /absolute /out='p1' /jou='p1' 'p1'
examine /word 2
define base = \
examine /long base+08
define contents = \
deposit /long base + 0c = contents
examine /long base+4
define contents = \
deposit /long base + 8 = contents
examine /long base+0
define contents = \
deposit /long base + 4 = contents
deposit /long base + 0 = 80000168
update
exit
$ EXIT
------