info-vax@ucbvax.ARPA (03/18/85)
From: GKN%OAK.SAINET.MFENET@LLL-MFE.ARPA Getting rid of the traceback handler in an image isn't too hard if you're willing to use HexZap (or Patch/Absolute under V4). Take the image file in question and do an $ Analyze/Image/Interactive on it. Get to the section where it lists the transfer addresses (there are 3) and copy them down somewhere. Now dump the first block of the image and spot those transfer addresses. The traceback handler will be called before the actual entry point for the image to set up the initial stack frame with the condition handler which produces that nasty stack trace. These transfer addresses are usually at 30H in the first block, but are not fixed. At any rate, simply move down the real program start address on top of the traceback handler with HexZap and zero out the call to the traceback handler. I seem to recall that one of the VMS System Dispatches had a command procedure to automate this, but I'm at home and they're at the office. So, here's a complete example: [Log file DSK2:[GKN]FOO.LOG;1 created by TTLINK V01.10 on 16-MAR-1985 11:16:35.59] $ type foo.mar .title foo .psect code exe,rd,nowrt,pic,shr,page .entry start,0 ret .end start $ macro foo $ link foo $ analyze/image/interactive foo IMAGE HEADER Fixed Header Information image format major id: 02, minor id: 04 header block count: 1 image type: executable (IHD$K_EXE) I/O channel count: default I/O page count: default linker flags: (0) IHD$V_LNKDEBUG 0 (1) IHD$V_LNKNOTFR 0 (2) IHD$V_NOP0BUFS 0 (3) IHD$V_PICIMG 1 (4) IHD$V_P0IMAGE 0 Press RETURN to continue, or enter a period (.) for next file: Image Activation Information first transfer address: %X'7FFEDF68' second transfer address: %X'00000200' third transfer address: %X'00000000' Press RETURN to continue, or enter a period (.) for next file: . The analysis uncovered NO errors. ANALYZE/IMAGE/INTERACTIVE FOO $ dump/block=(start:1,end:1) foo.exe Dump of file DSK2:[GKN]FOO.EXE;1 on 16-MAR-1985 11:13:22.89 File ID (2347,18,0) End of file block 4 / Allocated 4 Virtual block number 1 (00000001), 512 (0200) bytes 00000000 FFFFFFFF FFFFFFFF 00000101 34303230 00000000 004C0040 00300084 ..0.@.L.....0204................ 000000 00000000 00000000 00000200 7FFEDF68 00000400 00000000 A155A224 01000008 ....$.U.........h............... 000020 00003001 00000000 00000000 00000000 4F4F4603 00000001 00000000 00000004 .............FOO.............0.. 000040 00000000 00003630 2D333005 008DA155 A2249100 00000000 00000000 00000000 ..............$.U....03-06...... 000060 0000040A 00000002 00010010 00000002 00000080 00000001 00010010 00000000 ................................ 000080 FFFFFFFF FFFFFFFF FFFFFFFF FFFF0000 FD00008C 003FFFEC 0014000C 00000003 ..........?..................... 0000A0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ................................ 0000C0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ................................ 0000E0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ................................ 000100 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ................................ 000120 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ................................ 000140 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ................................ 000160 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ................................ 000180 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ................................ 0001A0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ................................ 0001C0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ................................ 0001E0 $ r hexzap ZAP>foo.exe _0:30/ 00:0030/ DF68 _200 _ 00:0032/ 7FFE _0 _ 00:0034/ 0200 _0 _ 00:0036/ 0000 _x gkn ------------------------------------------ Arpa: GKN%OAK.SAInet@LLL-MFE USPS: Gerard K. Newman Science Applications International 800 Oak Ridge Turnpike Oak Ridge, TN 37830 AT&T: (615) 482-9031