[futurebasic] Re: [FB] MacsBug

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 2001 : Group Archive : Group : All Groups

From: Robert Purves <robert.purves@...>
Date: Sat, 29 Sep 2001 00:24:32 +1200
>I'm writing an .INCL that will allow me to determine if MacsBug is
>installed, and if it is, then I can call some debugging FNs.
>
>What I'm having trouble with, is determining if MacsBig is
>installed/running.
>
 < snip >

>In 32bit mode, [_Macjmp] should be the address of MacsBug, if MacsBug is
>installed, but I need help interpreting the flags byte at address $BFF
>
>And I'm confused about testing the flags byte if I'm running in 24bit mode.


Who is old enough to remember when Macs went from 24 to 32 bit addressing?

I can't help on 24-bits, but the following is my translation of a routine
in Apple's 32-bit system debugging tools:

local fn IsLowLevelDebuggerCallable
dim callable as boolean
callable = ( |_MacJmpFlag| != 0xFF ) ¬
  and ( (|_MacJmpFlag| and 0xE0) == (|_MacJmpFlag| and 0x60) ) ¬
  and ( [_MacJmp] != 0 ) and ( [_MacJmp] != 0xFFFFFFFF )
end fn = callable

long if fn IsLowLevelDebuggerCallable
print "MacsBug is available"
xelse
print "MacsBug is not available"
end if



Robert P.