Path: utzoo!attcan!uunet!mcvax!ukc!etive!lfcs!nick From: nick@lfcs.ed.ac.uk (Nick Rothwell) Newsgroups: comp.sys.mac.programmer Subject: Re: LSC debugging code resources Keywords: combining text and graphics. Message-ID: <1198@etive.ed.ac.uk> Date: 2 Jan 89 14:33:24 GMT References: <221@dalcsug.UUCP> <966@geowhiz.UUCP> <1235@viscous> <896@husc6.harvard.edu> <66569@ti-csl.CSNET> <900@husc6.harvard.edu> Sender: news@etive.ed.ac.uk Reply-To: nick@lfcs.ed.ac.uk (Nick Rothwell) Organization: Laboratory for the Foundations of Computer Science, Edinburgh U Lines: 27 In article <900@husc6.harvard.edu> siegel@endor.UUCP (Rich Siegel) writes: > In fact, you can. LDEFs are quite easy to debug. Other defprocs >that are event-driven, such as CDEFs and MDEFs, can also be debugged >at the source level. Unfortunately, you can't debug WDEFs at the source level, >because of some tricks that the debugger pulls; however, you can embed >them in your program the same as any other defproc. Say, Rich, would you care to quickly explain your little trick again? You said something about creating a 6-byte resource containing "$4EF9 0000 0000". I presume that the $4EF9 is a "call-immediate" or something.... So: (i) Can I do this for any code resource? (ii) What about the resource? Does it have to use A4 rather than A5, if it's actually a bit of the same project? Any restrictions on access to globals, or anything like that? (iii) What code do you use to perform the patch? Is it in-store, or does it make a change to the resource file (which is not really what's required)? > --Rich Nick. -- Nick Rothwell, Laboratory for Foundations of Computer Science, Edinburgh. nick@lfcs.ed.ac.uk !mcvax!ukc!lfcs!nick ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ...while the builders of the cages sleep with bullets, bars and stone, they do not see your road to freedom that you build with flesh and bone.