Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!think!ames!haven!umbc3!alex From: alex@umbc3.UMD.EDU (Alex S. Crain) Newsgroups: comp.sys.att Subject: Re: KCL on a unix-pc Message-ID: <1260@umbc3.UMD.EDU> Date: 14 Oct 88 00:56:00 GMT References: <1246@umbc3.UMD.EDU> <1470@spp2.UUCP> Reply-To: alex@umbc3.UMD.EDU (Alex S. Crain) Organization: University of Maryland, Baltimore County Lines: 36 In article <1470@spp2.UUCP> baur@spp2.UUCP (Steven L. Baur) writes: >in article <1246@umbc3.UMD.EDU>, alex@umbc3.UMD.EDU (Alex S. Crain) says: >> I recently redid my port of KCL to the 3b1 ... > >I managed to port KCL to UNIXPC too, but ... > >> as soon as I can fix undump). ... > >failed on trying to make undump work. The technique I used for debugging In the spirit of unix philosophy, I decided that one undump is enough. Emacs unexec() works but requires special linking orders and other wonders, and the kcl undump isn't very system 5ish. TeX, however, got it right. TeX comes with an undump program that works like this: 1) get your target program to the state you want (loaded, or whatever) 2) Inspire it to dump core, say with ^\ 3) % undump new_a.out old_a.out corefile 4) THe result is a binary generated from the dumped image. This requires no special anything on the part of the target program, and works fine on just about anything. (I undumped less once, and the file buffers still had stuff un them :-)). Undump doesn't work out of the box, but its been ported to the 3b1, and knows about shlib, etc. I believe that Brant Cheikes did the port, but I don't remember off hand. The only fault is that undump can't restore the symbol table, so if you need that, you have to save the old image for reading. (Thats the problem with KCL). I've been meaning to fix that, but I havn't had time. I would send sources to anyone who asked. -- :alex. Systems Programmer nerwin!alex@umbc3.umd.edu UMBC alex@umbc3.umd.edu