Path: utzoo!utgpu!water!watmath!clyde!burl!codas!ufcsv!ukma!psuvm.bitnet!cunyvm!unknown From: rrk@byuvax.bitnet Newsgroups: comp.os.vms Subject: Re: BACKUP under VMS 4.6 needs PHY_IO !?!? Message-ID: <62rrk@byuvax.bitnet> Date: 20 Jan 88 05:31:09 GMT Lines: 28 I posted a short patcher to make /NOTRACEBACK images debugable several months ago. I just discovered that it has been trashed on this system. I will post it tomorrow. This is how it works: Try linking an image two ways, first /NODEBUG/TRACEBACK and then /NODEBUG/NOTRACEBACK. You will find that the images have the following three slots for transfer vectors (usually at byte 48). In a /notraceback image, there will only be one transfer vector, directly to the main entry point. In the /traceback version, the first transfer address is somewhere in the 7fffffff control region, and the second is the main transfer address. But there are NO additional images in the list of referenced images. This address is the same for all images linked /TRACEBACK. All you have to do is move the longword at offset 48 to 52 and put this special address into the longword at offset 48 and it works. I do it all the time. You will have to do a RUN/DEBUG so that it will run debug since it was linked /NODEBUG. But if you take the byte stored at offset 32 and (even in a /NODEBUG image and make it odd (by adding one) the image flags will say that the image was linked debug and you can even activate it debug from a command in DCLTABLES. This is very useful for debugging VMS images (shipped /NOTRACEBACK/NODEBUG) which must be activated from a DCL command, since you can't use the run/debug command or it will get errors about entities missing from DCLTABLES. The best procedure is to copy the image from sys$system to a local directory. Then define a logical name (the same as the image name) to tell the command where to find the image (such as DEFINE MACRO32 MYDISK:[MYDIR]MACRO32PATCHED). When changing these offsets in the image header, it is easiest to use PATCH/ABSOLUTE. Then you are dealing with hex offsets 20 and 30.