Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 UW 5/3/83; site uw-beaver Path: utzoo!watmath!clyde!burl!ulysses!mhuxj!houxm!vax135!cornell!uw-beaver!info-mac From: info-mac@uw-beaver (info-mac) Newsgroups: fa.info-mac Subject: Re: Debugger tip Message-ID: <1987@uw-beaver> Date: Sun, 21-Oct-84 23:50:46 EDT Article-I.D.: uw-beave.1987 Posted: Sun Oct 21 23:50:46 1984 Date-Received: Tue, 23-Oct-84 00:41:36 EDT Sender: daemon@uw-beave Organization: U of Washington Computer Science Lines: 60 From: Mark H. Nodine First, the "official" way to do an ExitToShell trap is with code ADF4, although A9F4 also works. The following program for generating symbol tables for use with macsbug is courtesy of Steve Geyer. To get symbols from a b.out file, do getsyms > file.sym Cheers, Mark ------- #! /bin/sh : shell archive echo x - getsyms cat <getsyms /u1/stanford/bin/nm68 -n b.out | fixup 4e48 EOT chmod 0775 getsyms echo x - fixup.c cat <fixup.c #include main (ac, av) int ac; char *av[]; { long offset; long addr; char type; char buffer[100]; char name[100]; if (ac != 2) { printf ("usage: %s main_offset\n", av[0]); exit (0) ; } sscanf (av[1], "%x", &offset); while (1) { fgets (buffer, 100, stdin); if (feof (stdin)) break; sscanf (buffer, "%o %c %s", &addr, &type, name); printf ("%06x %c %s\n", addr+offset, type, name); } } EOT echo x - Makefile cat <Makefile default: fixup fixup: fixup.c cc -O fixup.c -o fixup EOT