[comp.sys.mac.programmer] Static Semantic Checking?

phil@mit-amt.MEDIA.MIT.EDU (Phil Sohn) (05/27/88)

Since everyone was so helpful about MPW search (aka grep) let
me try this question again:

Does anyone know of a static semantic checker for MPW C?  Something
along the lines of lint.  MPW does more checking than LSC, but still
not enough.

What do you guys use to track down bugs?  Macsbug is ok, but be
real, debugging in machine code is a pain. Right now I have a
problem in data initialization that I can not track down.  My
program never even gets to main!


Phil Sohn		phil@ems.media.mit.edu

dan@Apple.COM (Dan Allen) (05/28/88)

There is no lint available for MPW yet, to my knowledge.

As for your data init bug, what I would do is use MacsBug in the
following manner.  Start up without MultiFinder.  Do an AB on Launch.
Double click on your app.  When you go into MacsBug you are not far from
your code.  SB 12D 1  which will then set an interesting ROM Debugger
break right before the first line of your code (or your compiler's
_RTINIT code).  Trace twice after you have gone and you will be at your
code.  Tracing from there on will show you what's going on...

SUMMARY:

AB Launch
G
Double click on app
You will then be placed in MacsBug
SB 12D 1
G
You will again enter MacsBug
T
T
Now you are at the first step of your code.

Dan Allen
Software Explorer
Apple Computer