Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!ll-xn!mit-eddie!bloom-beacon!gatech!purdue!i.cc.purdue.edu!k.cc.purdue.edu!l.cc.purdue.edu!cik From: cik@l.cc.purdue.edu (Herman Rubin) Newsgroups: comp.arch Subject: Re: Self Modifying Code Summary: What it you want a real trace? Keywords: writing return address to routine front Message-ID: <841@l.cc.purdue.edu> Date: 21 Jul 88 11:36:55 GMT References: <5254@june.cs.washington.edu> <76700032@p.cs.uiuc.edu> <361@scolex> <2317@pt.cs.cmu.edu> Organization: Purdue University Statistics Department Lines: 17 Occasionally I have needed to trace a program for debugging purposes. I do not mean the trace facilities usually included with HLLs; I mean that exactly what happens on any given hardware instruction is printed out. (Beware; know exactly what you are doing and how much output you will get, as thousands of pages can result.) The only way to do this is to copy each instruction, possibly modified to handle certain types of address modification and jump instructions, to some place in memory and then execute it and print out what happens. This should be done very carefully; in most cases there are much cheaper ways to achieve the same results. I have located errors in programs which would have been difficult to find otherwise. -- Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907 Phone: (317)494-6054 hrubin@l.cc.purdue.edu (Internet, bitnet, UUCP)