unc bugs (M68K disassembler) and kudos to the author (46 lines)

R.MAUS rick at caelum.UUCP
Fri Aug 23 15:18:27 AEST 1985


This line intentionally left non-blank for obsolete netnews installations.

There is a small, but VERY annoying bug in "unc" for those of us running
UNIPLUS+ SYS V ports that prevents final load modules from being disassembled.
"unc" assumes that the entry point is always 0 when dealing with unmapped
instructions.  Find the section around line 389 in "heur.c" that reads:

385	/*
386	 *	Deal with unmapped instructions.
387	 */
388	
389	for  (pos = 0;  pos < endt;)  {

Change the "for" loop to read:

	for  (pos = mainfile.ef_entry;  pos < endt;)  {

There are some other bugs (anomalies, quandaries?) with stripped modules where
"unc" can't properly pair together text string labels with absolute addresses
that were pushed onto the stack.  Rather, the strings addresses are viewed as
data at absolute addresses in memory.  Another problem sometimes occurs where
the first two characters are interpreted as a "word" followed by text, as in:

	DS119:
		.word	0x466c		| Should be "Floppy disk"
		.asciz	"oppy disk"

In closing, I wish to present an open letter to the author of "unc",
John M. Collins:

John,

  Did you ever consider working with Dr. Richard M. Stallman of the GNU (GNU is
Not UNIX(tm)) project?  You two seem like a natural.  :-)

  Any way you look at it - I owe you one.  When I get the "Prolog" decompiler
working on the tail of your program to produce "C" source, I'll return the
favor.
--
				Richard L. Maus, Jr. (Rick)
				AT&T-ISL HO 1K313 201-834-4532
				...!ho???!ariel!rick



More information about the Comp.sources.bugs mailing list