Path: utzoo!mnetor!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!mailrus!ames!pasteur!ucbvax!hplabs!sdcrdcf!trwrb!arenberg From: arenberg@trwrb.UUCP (Jeff Arenberg) Newsgroups: comp.sys.apple Subject: Re: APW C debugging question Message-ID: <791@trwcsed.trwrb.UUCP> Date: 6 May 88 16:50:30 GMT References: <4827@ihlpl.ATT.COM> Reply-To: arenberg@trwcsed.UUCP (Jeff Arenberg) Organization: TRW EDS, Redondo Beach, CA Lines: 35 Keywords: APW C debugging In article <4827@ihlpl.ATT.COM> nala@ihlpl.ATT.COM (A. Flora-Holmquist) writes: >I am a new IIgs programmer and purchased the APW shell, C compiler, and >APW debugger. The debugger is a machine level debugger, the C compiler >to the best of my reading does not/will not produce an assembly listing. >If I need to debug a C program it appears that sprinkling DrawCString >in the code is my only choice. Have I missed something obvious in the >APW documentation that addresses debugging C programs with the APW >debugger? Any hints? It seems so obvious that a compiler should support >some debugger that I can't believe the APW C compiler/APW debugger >combination is useless. > >Thanks for the help. > >Al Flora-Holmquist >ihnp4!ihlpl!nala Regretfully you are quite accurate in your assessment. For C code, the debugger is practically useless. (No, you didn't miss anything in the documentation :-( ) A big part of the problem is all of the startup code that is inserted when you link in 2/start. If you can find the end of that code, and the beginning of yours, and insert a break at that point, then you have a better chance of tracing your code. About the only way I know of doing this is to look for Toolbox traps. I look for the calls to Init each toolbox and assume I'm close. Of course this approach is useless if you aren't using toolbox calls, like when converting Unix source code. If anyone knows a better way, *PLEASE* say something. Jeff Arenberg ------------------------------------------------------------ UUCP : ( ucbvax, ihnp4, uscvax ) !trwrb!trwcsed!arenberg ARPA : jarenberg@ecla.usc.edu GEnie: shifty ------------------------------------------------------------