[comp.sys.mac.programmer] How do I get Discipline?

earleh@eleazar.dartmouth.edu (Earle R. Horton) (03/16/89)

I have heard a lot about something called Discipline, a package which
checks parameters to ToolBox calls.  Where is the best place to get it?

Earle R. Horton. 23 Fletcher Circle, Hanover, NH 03755--Graduate student.
He who puts his hand to the plow and looks back is not fit for the kingdom
of winners.  In any case, 'BACK' doesn't work.

jackiw@cs.swarthmore.edu (Nick Jackiw) (03/17/89)

In article <12678@dartvax.Dartmouth.EDU> earleh@eleazar.dartmouth.edu (Earle R. Horton) writes:
> I have heard a lot about something called Discipline, a package which
> checks parameters to ToolBox calls.  Where is the best place to get it?
> 
> Earle R. Horton. 23 Fletcher Circle, Hanover, NH 03755--Graduate student.

Two that I know of:
The copy of TMON that I purchased came with Darin Adler's EUA (Extended
User Area), which includes two varieties of trap discipline: rigid and
lenient.  Lenient works pretty well at detecting odd-addresses and other
This-MUST-Be-Wrong sort of arguments (although most of the ones its flagged
in my code are SOOO wrong that they would've halted the processor shortly
thereafter anyway); Rigid works TOO well (in that it complains about a 
lot of things that are intentional and that work by bending but not
breaking the rules). An pre-6.0 Finder used to continually break, for
instance.

Steve Jasik's _TheDebugger_, included with MacNosy v2, has TrapDiscipline
available under its Bondage menu.  A relevant quote from the manual:

"The values of the various types [of trap args] are checked for range errors.
I. E. things that should point into the heap, or a particular heap are
checked as such, etc. ... Note that some ROM trap calls are flagged as bad
by Discipline, but are OK in the sense that the offending fields will be
properly setup when they are used. That is the local context in which
Discipline checks the arguments is insufficient relative to the global 
context of the use of the field." [p. 35]

While theDebugger looks feature-laden and more powerful, in general, than
TMON, its manual seems to have been composed by amphetamized howler
monkeys.  I don't object to all of the "unimplemented features," or even
to a program that comes with its internal-debugging-data still displayed
(cause of the notorious Internet worm...), but WHY OH WHY DO DEBUGGING
MANUALS HAVE TO BE SO BADLY WRITTEN?  The TMON manual I have is also
garbage, though not as bad (and I understand it's been revised). Debuggers
are supposed to save us time. A good manual would save lots.

I'm waiting on SADE, which I suspect will have at least intelligible, if
not well-written, documentation.  APDA's way behind on their MPW 3 
shipments though...  (I love paying a mandatory $12 FedEx bill for a
package I'm not going to see for four weeks anyway.)

Hope this helps.


-- 
+-------------------+-jackiw@cs.swarthmore.edu / !rutgers!bpa!swatsun!jackiw-+
|  nicholas jackiw  | jackiw%campus.swarthmore.edu@swarthmr.bitnet           |
+-------------------+-VGP/MathDept/Swarthmore College, Swarthmore, PA 19081--+
"Ah...I've got this CHRONIC pain."                             _True Believer_

thecloud@dhw68k.cts.com (Ken McLeod) (03/18/89)

In article <2555@ilium.cs.swarthmore.edu> jackiw@ilium.UUCP (Nick Jackiw) writes:
>In article <12678@dartvax.Dartmouth.EDU> earleh@eleazar.dartmouth.edu (Earle R. Horton) writes:
>> I have heard a lot about something called Discipline, a package which
>> checks parameters to ToolBox calls.  Where is the best place to get it?
>> 
>> Earle R. Horton. 23 Fletcher Circle, Hanover, NH 03755--Graduate student.
>
>Two that I know of:
>The copy of TMON that I purchased came with Darin Adler's EUA (Extended
>
>Steve Jasik's _TheDebugger_, included with MacNosy v2, has TrapDiscipline
>available under its Bondage menu.  A relevant quote from the manual:

 I don't think either of these packages were what Earle had in mind. There
was/is an Apple-developed product called Discipline (the copy I saw had
an icon which looked like, um, a woman's high-heeled shoe) that has never
been officially "released" (at least, not to my knowledge...)  The debugging
tools that *have* been released are "RAMDump" and "ReAnimator"... see the
latest APDAlog.

 Perhaps someone from DTS can comment on the status of Discipline?


                                      "The fact is, no matter how closely
                                      I study it, no matter how I take it
                                      apart, no matter how I break it down,
                                      it remains consistent. I WISH YOU WERE
                                      HERE TO SEE IT!"
                                           -- King Crimson, "Indiscipline"
-- 
==========     .......     =============================================
Ken McLeod    :.     .:    felix!dhw68k!thecloud@ics.uci.edu
==========   :::.. ..:::   InterNet: thecloud@dhw68k.cts.com
                ////       =============================================

dudek@ai.toronto.edu (Gregory Dudek) (03/21/89)

In article <21076@dhw68k.cts.com> thecloud@dhw68k.cts.com (Ken McLeod) writes:
>In article <2555@ilium.cs.swarthmore.edu> jackiw@ilium.UUCP (Nick Jackiw) writes:
>>In article <12678@dartvax.Dartmouth.EDU> earleh@eleazar.dartmouth.edu (Earle R. Horton) writes:
>>> I have heard a lot about something called Discipline, a package which
>>> checks parameters to ToolBox calls.  Where is the best place to get it?
>>> 
>>Two that I know of:
>>The copy of TMON that I purchased came with Darin Adler's EUA (Extended
>
> I don't think either of these packages were what Earle had in mind. There
>was/is an Apple-developed product called Discipline (the copy I saw had
>an icon which looked like, um, a woman's high-heeled shoe) that has never
>been officially "released" (at least, not to my knowledge...)  The debugging
>tools that *have* been released are "RAMDump" and "ReAnimator"... see the
>latest APDAlog.
>
> Perhaps someone from DTS can comment on the status of Discipline?

  The 6.1 version of MacsBug I have refers to Discipline in its on-line
help.  I've always assumed in was TMON's it was referring to (which doesn't
really make sense since why would I be in Macsbug anyhow).  If such a
facility existed as a MacsBug accessory, that would be great.

  For those of us who aren't ADPA members, would somebody care to inform us
what  "RAMDump" and "ReAnimator" are?

  While I'm at it, it would be really nice to be able to execute
MacsBug's heap checking under program control, as a diagnostic.  There
are certain points where I may suspect my program's operation, but I don't want
to run with heap checking on all the time 'cause it's just too slow for
nowmal operation.  Too bad there's no way to find MacsBug internal routine
addresses.

  Greg Dudek
-- 
Dept. of Computer Science (vision group)    University of Toronto
Nice mailers:  dudek@ai.utoronto.ca
UUCP: {uunet,decvax,linus,pyramid,
		dalcs,watmath,garfield,ubc-vision,calgary}!utai!dudek
ARPA: user%ai.toronto.edu@relay.cs.net

earleh@eleazar.dartmouth.edu (Earle R. Horton) (03/22/89)

In article <89Mar20.184214est.11025@ephemeral.ai.toronto.edu> 
	dudek@ai.toronto.edu (Gregory Dudek) writes:
...
>  The 6.1 version of MacsBug I have refers to Discipline in its on-line
>help.  I've always assumed in was TMON's it was referring to (which doesn't
>really make sense since why would I be in Macsbug anyhow).

     Exactly.  The on-line help implies that one can load Discipline
in such a fashion that it will work with Macsbug.  The question is:
Where to get such a beast?
>
>  For those of us who aren't ADPA members, would somebody care to inform us
>what  "RAMDump" and "ReAnimator" are?
>
     I read about these in Mac-something-or-other a few months back.
Apparently, these allow one to run a program, then dump the machine
state to a floppy.  ReAnimator apparently allows you to look at the
saved state later, something like using adb to look at a core file in
UNIX.  I suppose you give your beta-testers RAMDUmp along with the
beta-version of your program, and then they send you back core files
to look at.  I wonder how severe a crash can occur, and the RAM-dumper
still function?

earleh:xyzzy:32768:7:Earle R. Horton,,,6434109:/hackers/earleh:/bin/rn

bezanson@adobe.COM (Brian Bezanson) (03/24/89)

In article <89Mar20.184214est.11025@ephemeral.ai.toronto.edu> dudek@ai.toronto.edu (Gregory Dudek) writes:
>  The 6.1 version of MacsBug I have refers to Discipline in its on-line
>help.  I've always assumed in was TMON's it was referring to (which doesn't
Hmmm... Didn't know that there was a 6.1 version out, still using 6.0
Anyway, you can do a form a discipline by going into Macsbug and setting
heap scramble on - then any calls to NewPtr, NewHandle, etc.. will cause a
the heap to be scrambled.

>  While I'm at it, it would be really nice to be able to execute
>MacsBug's heap checking under program control, as a diagnostic.  There
You can do this, check the doc, check MacDTS.

----
Brian Bezanson
bezanson@adobe.com

omh@brunix (Owen M. Hartnett) (03/24/89)

Although it's been stated that Discipline has been on some bulletin
boards, the only place I've ever seen it is in TMON, as part of the
user area.  You also get the user area source and (I believe) the
source to Discipline so that you can make alterations as necessary.

Not to mention that TMON is a great debugger, which it is.  And
no, I have no connections with ICOM Simulations, or whoever it is
that makes TMON.

Owen Hartnett
Brown University Computer Science

omh@cs.brown.edu.CSNET