info-mac@uw-beaver (info-mac) (10/22/84)
From: Mark H. Nodine <mnodine@BBNH.ARPA>
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 <<EOT >getsyms
/u1/stanford/bin/nm68 -n b.out | fixup 4e48
EOT
chmod 0775 getsyms
echo x - fixup.c
cat <<EOT >fixup.c
#include <stdio.h>
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 <<EOT >Makefile
default: fixup
fixup: fixup.c <stdio.h>
cc -O fixup.c -o fixup
EOTinfo-mac@uw-beaver.UUCP (10/25/84)
From: John W. Peterson <JW-Peterson@UTAH-20.ARPA> If you unexpectedly trap into Macsbug, doing: >PC 5000 >SM PC A9F4 >G Usually gets you back to the finder without having to re-boot. It even seems to work after receiving a "bomb" dialogue, just use the interrupt button to get into the debugger. (All it does is force the execution of the ExitToShell trap). Question: Has anybody perfected the art of getting a symbol table out of the Sumacc loader that would be useful in dealing with Macsbug? -------