Organization: University of Waikato, Hamilton, New Zealand
In article <1994Nov23.003220.3519@gallant.apple.com>, Jens Alfke <jens_alfke@powertalk.apple.com> writes:
>
> There is an undocumented OSAGetSysTerminology call that AppleScript
> implements (this is what the Script Editor calls) but it appears to have been
> sanitized out of the shipping OSA.h and AppleScript.h headers.
I believe you'll find this call in ASDebugging.h/.p. It looks like this:
CONST
kASSelectGetSysTerminology = 0110BH;
PROCEDURE OSAGetSysTerminology
(
scriptingComponent : ComponentInstance;
modeFlags : AESendMode;
terminologyID : ShortInt;
VAR terminologyList : AEDesc
) : OSAError;
CODE
02F3CH, 10, kASSelectGetSysTerminology,
07000H,
0A82AH;
Lawrence D'Oliveiro fone: +64-7-856-2889
Computer Services Dept fax: +64-7-838-4066
University of Waikato electric mail: ldo@waikato.ac.nz
Hamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
---------------------------
>From sjm@mole.bio.cam.ac.uk (Steven J. Mcclue)
Subject: MacsBug - what is it and why?
Date: Mon, 21 Nov 1994 10:19:23 +0000
Organization: Dept of Genetics, University of Cambridge
Apologies if this is the wrong place for this, but could someone tell me what programmers use MacsBug for? I'm a real newbie at programming (ie, I'm about half way through Dave Mark's book "Learn C on the Mac" and not finding it easy!!), and I've often seen mention of MacsBug. I used to have a copy, but on the rare occasions it popped up, it seemed full of unintelligible stuff. Now that I'm deling with lots of unintelligible stuff, maybe some kind soul could enlighten me as to what it all means?
Thanks!
Steve McClue
sjm@mole.bio.cam.ac.uk
+++++++++++++++++++++++++++
>From jaks@netcom.com (Eric Jackson)
Date: Mon, 21 Nov 1994 16:27:23 GMT
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
In article <sjm-2111941019230001@131.111.46.92>,
Steven J. Mcclue <sjm@mole.bio.cam.ac.uk> wrote:
>Apologies if this is the wrong place for this, but could someone tell me what programmers use MacsBug for? I'm a real newbie at programming (ie, I'm about half way through Dave Mark's book "Learn C on the Mac" and not finding it easy!!), and I've often seen mention of MacsBug. I used to have a copy, but on the rare occasions it popped up, it seemed full of unintelligible stuff. Now that I'm deling with lots of unintelligible stuff, maybe some kind soul could enlighten me as to what it all means?
>
>Thanks!
>Steve McClue
>sjm@mole.bio.cam.ac.uk
Yes this is exactly the place to post questions like this. The idea
behind this news group was to provide a place for newbies to post questions
with out having to feel embarassed about it. What is MacsBug,
that would take a while to explain in detail. In one sentince
its a LowLever debugger, and a good one. This means that it takes
you down into the assemble language lever. I have never writen any
assemble language code but I still like to look at it. After a
while you will start to learn more and more about it.
Here are a couple of basic tips. You can get into MacsBug by
calling: DebugStr("\p your debugger comment goes here");
with the think Use Debugger option turned of. Once your in the
debugger you can go again assuming things are not messed up by
typing g, to step one step at a time type s, to get out of your
application type ea for exit application, if your application is
already messed up type rb for reboot. You can also type es for
exit shell. Type h for help and get a list of all the commands,
type il for instruction list and get an assembly language list of
your code. If you look at it you might be able to see some tool
box routines that you recognise to get an idea of where you are.
Normally you use a lowlever debugger when your high level debugger
is not working correctly in finding a bug. There is quite a lot
more to know about MacsBug, but this will give you a really short
overview.
Eric Jackson
jaks@netcom.com
+++++++++++++++++++++++++++
>From coopem@panix.com (Marc Cooperman)
Date: Tue, 22 Nov 1994 10:07:55 -0500
Organization: Jumpstart Technologies
I don't claim to be a MacsBug expert.
It's a low-level debugger - which means, generally, you don't see source
code in it, but you can look directly at the Macs memory, registers, and
program counter, which describe its state, at a level below such higher
level languages like C.
You enter MacsBug in 2 situations - the machine encounters a heinous
processing error in a particular program from which it can't recover, so
it gives up, and
deposits you into the aesthetically pleasing MacsBug screen, in the vain
hope the you too speak hexdecimal and will be able to diagnose the
problem. In this case you can type es [Return] to try and cleanly exit the
program and recover to the finder, or ea [Return] to try restarting the
offending program from scratch.
If you're feeling brave, you can try the sc or sc7 commands to do a "stack
crawl" which basically shows you a heirarchy of function calls leading up
to the crash. If the program was compiled with debugging info, you may
actually see readable function names, and if this a development project of
your own, it may give you a clue where to look for a bug in your code.
The other situation is a forced MacsBug entry where you either hit the
interrupt switch on your Mac (I think this causes an "NMI" Non Maskable
Interrupt? on the processor) which puts you immediately in MacsBug with
the "NMI" message, or by calling DebugStr() from your code, which can
print a message of your choice, say if you detect an error condition like
a NULL pointer BEFORE it actually hoses your machine.
In article <sjm-2111941019230001@131.111.46.92>, sjm@mole.bio.cam.ac.uk
(Steven J. Mcclue) wrote:
> Apologies if this is the wrong place for this, but could someone tell me
what programmers use MacsBug for? I'm a real newbie at programming (ie,
I'm about half way through Dave Mark's book "Learn C on the Mac" and not
finding it easy!!), and I've often seen mention of MacsBug. I used to have
a copy, but on the rare occasions it popped up, it seemed full of
unintelligible stuff. Now that I'm deling with lots of unintelligible
stuff, maybe some kind soul could enlighten me as to what it all means?
>
> Thanks!
> Steve McClue
> sjm@mole.bio.cam.ac.uk
+++++++++++++++++++++++++++
>From nick+@pitt.edu ( nick.c )
Date: Mon, 28 Nov 1994 15:56:13 -0500
Organization: The Pitt, Chemistry
In article <jaksCzMLpn.4vM@netcom.com>, jaks@netcom.com (Eric Jackson) wrote:
> Normally you use a lowlever debugger when your high level debugger
> is not working correctly in finding a bug. There is quite a lot
> more to know about MacsBug, but this will give you a really short
> overview.
[tips omitted]
If you [original poster] are interested in getting a handle on
more info, consider buying a copy of:
_MacsBug Reference and Debugging Guide_
by Apple Computer $35
Addison Wesley, 1990, ISBN: 0-201-56768-7
just started chewing on it myself. But it seems to be the only
reference for MacsBug.
BTW, anyone know if there is a chance that this will eventually
wind up in DocViewer format on a _develop_ bookmark or Developer
reference CD? I'm kind of surprised it hasn't, maybe Apple is
waiting for version 6.5 final release before doing it...?
Internet: nick+@pitt.edu _/ _/ _/ _/_/_/ _/ _/
eWorld: nick _/_/ _/ _/ _/ _/ _/_/_/
CIS: 71232,766 _/ _/_/ _/ _/ _/ _/
http://www.pitt.edu/~nick/ _/ _/ _/ _/_/_/ _/ _/
---------------------------
>From telesis@ecf.toronto.edu (Telesis North)
Subject: how to get PB in PPC completion routine?
Date: Thu, 24 Nov 1994 23:53:56 GMT
Organization: sparodic
Does anyone out there have a good strategy for writing completion routines
that compile for both PPC and 68K?
My problem is that I have to write a completion routine for the serial
driver. I would _really_ like to get access to the parameter block;
unfortunately, it's not passed as a parameter. (That would be too
sensible.)
For 68K, A0 comes in pointing to the PB, and a bit of assembly will put it
into a local variable. Clearly this isn't going to work on a PowerMac.
(I realize that I could leave the completion routine as 68K without a
significant performance hit - at least until Copland - but I'd prefer not
to complicate my build process with mixed code.)
Anyone have any ideas? (What does DTS think?)
--
Roger Pantos Telesis North, Inc. telesisnorth
Mac Software Guy telesis@ecf.toronto.edu (AppleLink)
"They want better products for free." -- from "Dilbert"
+++++++++++++++++++++++++++
>From jumplong@aol.com (Jump Long)
Date: 24 Nov 1994 23:55:12 -0500
Organization: America Online, Inc. (1-800-827-6364)
In article <CzsqDw.2rq@ecf.toronto.edu>, telesis@ecf.toronto.edu (Telesis
North) writes:
>My problem is that I have to write a completion routine for the serial
>driver. I would _really_ like to get access to the parameter block;
>unfortunately, it's not passed as a parameter. (That would be too
>sensible.)
>
> (a bunch ommitted )
>
> Anyone have any ideas? (What does DTS think?)
Look in Files.h and you'll find what you need for IOCompletion routines.
If you're compiling native, the parameter block pointer is passed to your
completion routine as a parameter.
However, for the time being I'd leave completion routines in 68K code
because the Device Manager is still emulated 68K code. You'd have the
overhead of a couple of mixed mode switches if your completion routine was
written in PowerPC code. Since you shouldn't be doing processor intensive
processing at completion time anyway, writing PowerPC completion routines
shouldn't help your performance (and quite possibly will hurt it under
System 7).
- Jim Luther
+++++++++++++++++++++++++++
>From paul@architecture.mcgill.ca (Paul Lalonde)
Date: Fri, 25 Nov 1994 07:46:39 -0400
Organization: McGill University School of Architecture
In article <CzsqDw.2rq@ecf.toronto.edu>, telesis@ecf.toronto.edu (Telesis
North) wrote:
> Does anyone out there have a good strategy for writing completion routines
> that compile for both PPC and 68K?
>
> My problem is that I have to write a completion routine for the serial
> driver. I would _really_ like to get access to the parameter block;
> unfortunately, it's not passed as a parameter. (That would be too
> sensible.)
If you're using CodeWarrior, you can declare a function argument as residing
in a register (68K only). You would then have a slightly different function
declaration for your completion proc, depending if you're compiling for the