[comp.sys.mac.programmer] MacsBug ignoring breakpoints

gix%mdi.com (Brian Gix) (09/29/90)

Can anyone tell me the proper way to set breakpoints using MacsBug?
I have been trying to use it to debug a project I'm doing, and
although I know the points in the code & suppose to be breaking
on are being called, the breakpoint seems to have no effect.
Currently I'm resorting to poking _Debug (A9FF) traps at my
breakpoints, but thats kind of cumbersome.  Anyone have good
experiances with this? (or should I bag it & buy TMON?)

--Brian Gix

-- 
================================================================================
|| Brian Gix            ||   gix@mdi.com               gixb@prism.cs.orst.edu ||
|| MDI - Motorola       ||   gix@nwnexus.wa.com        ...!uunet!mdisea!gix   ||
|| Bothell, WA 98011 USA||   AmOnline: GIX             Phone: (206) 487-5894  ||

llama@eleazar.dartmouth.edu (Joe Francis) (09/29/90)

Brian Gix writes:
>Can anyone tell me the proper way to set breakpoints using MacsBug?
>I have been trying to use it to debug a project I'm doing, and
>although I know the points in the code & suppose to be breaking
>on are being called, the breakpoint seems to have no effect.

Perhaps more detail on what you are doing would help.  I know that
some games (Pirates comes to mind) reset the trace (and other)
exception vectors to make it difficult to "crack" their copy
protection.

Perhaps some development environments do this for their own source level 
debuggers.

Does anyone know what happens to the exception vectors under multifinder
if one program "Chains" another?  Does the child inherit the parents
exception vectors?  Or does multifinder stuff in some set of "golden"
vectors?

Inquiring minds want to know.

-----------------------------------------------------------------------------
"Read My Lips: No Nude Texans!" - George Bush clearing up a misunderstanding

das@Apple.COM (David Shayer) (10/03/90)

In article <24762@dartvax.Dartmouth.EDU> llama@eleazar.dartmouth.edu (Joe Francis) writes:
>Brian Gix writes:
>>Can anyone tell me the proper way to set breakpoints using MacsBug?
>>I have been trying to use it to debug a project I'm doing, and
>>although I know the points in the code & suppose to be breaking
>>on are being called, the breakpoint seems to have no effect.
>
>Perhaps some development environments do this for their own source level 
>debuggers.
>
>Does anyone know what happens to the exception vectors under multifinder
>if one program "Chains" another?  Does the child inherit the parents
>exception vectors?  Or does multifinder stuff in some set of "golden"
>vectors?

The _Chain trap is not supported.  Call it - it'll crash.

I have not had any problems setting breakpoints using Macsbug in
programs I'm debugging with Think C, Think Pascal, and SADE.  

If you break into Macsbug when you hit a _Debugger trap which you poke
into your code, you should break when you hit a Macsbug breakpoint.
Setting breakpoints is easy.  Just type BR ADDR.  If someone overwrites
the breakpoint, Macsbug will tell you next time you drop into Macsbug.
To see what breakpoints you have set, type BRD.  Be sure to clear your
breakpoints when you're done, type BRC.

David