TweetFollow Us on Twitter

Aug 97 MacTech Online

Volume Number: 13 (1997)
Issue Number: 8
Column Tag: MacTech Online

MacTech Online

by Nicholas C. "nick.c" DeMello <online@mactech.com>

It's Called MacsBug

Not MacBug, not MacBugs. The acronym stands for "Motorola advanced computer systems debugger." This powerful system extension allows developers to view and manipulate the contents of the Macintosh ram. You can download the latest version from Apple's Developer World ftp site, but if that (or any Apple ftp server) is busy check out Apple's "Software Home" page. The Software Home allows you to search for the latest version of any software Apple distributes.

MacsBug can be installed by simply dragging its file into your system folder (not your control panels folder, not your system extensions folder). When you restart your "Welcome to Macintosh" screen will display "debugger installed" if MacsBug loads (or the phrase "...carry a big stick" if you have a beta OS). Once installed, you can drop into MacsBug by hitting the command and power (triangle) keys together. Older systems require a system extension called programmers key to drop into MacsBug. Dropping into MacsBug suspends all processes and allows you direct access to all values in memory (great for pausing Doom). To return to the finder hit command-G, or to restart your Mac type "rs."

One way to learn more about using MacsBug is to drop into it and type "help" (or if you'd rather get the same information without wandering around your system memory visit Thomas Kimpton's MacsBug Help page). The Code Mechanic, Dave Evans, has at least three develop articles about wielding MacsBug (my favorite was "Stalking the Wild Defect"). In the September 1994 MacTech tips and tidbits there is a nice example of how to build a MacsBug macro, and the neat trick of making it execute automatically, every time MacsBug is entered. Check it out on the MacTech website.

Sleuthing through your systems memory is only half the fun though. When you've built up enough confidence to try and manipulate some memory see the Kool MacsBug Tricks page.

Download MacsBug from Devworld
ftp://ftp.apple.com/devworld/Tool_Chest/Testing_-_Debugging/Debuggers_-_dcmds/
Find the Latest Apple Software at Apple's "Software Home"
http://support.info.apple.com/ftp/swhome.html
Download Programmers Key or EvenBetterBusError
ftp://ftp.apple.com/devworld/Tool_Chest/Testing_-_Debugging/General_tools/
MacsBug Help
http://www.ambrosiasw.com/~dnebing/macsbug.html
Stalking the Wild Defect
http://devworld.apple.com/dev/techsupport/develop/issue27/balance.html
The MacsBug "Every time" Macro, MacTech Archives
www.mactech.com/articles/mactech/Vol.10/10.09/Sep94Tips/index.html
Kool MacsBug Tricks
http://gossamer.wheatonma.edu/users/bcote/syzgycult/Macsbug.html

EvenBetterBusError -- The Art of the Controlled Crash

EvenBetterBusError crashes your Mac. Unlike most software though, Greg Marriott's system extension does so on purpose. When you have EBBE installed, if your code dereferences a NIL pointer, writes to a NIL pointer, or attempts to execute code at NIL EBBE will crash your Mac (dropping you into MacsBug). Greg has put EBBE and three other stress testing tools that he developed at Apple on the web. Greg warns that some these tools are showing a little age, and recommends folks consider Onyx technologies commercial stress testing tools. Onyx's QC is an established and well respected stress tester. If you want to shake your code -- hard: give it to QC.

Oh, and those of you looking for the fourth generation of Mr. BusError can find YetEvenBetterBusError (aka DavesBetterBusError) beta on Dave Evan's web site. This more aggressive version of EBBE, announced in the May 1997 MacTech, can also be found on the MacTech ftp site along with the Tidy Heap C++ class library (for tracking proper use of new and delete).

EvenBetterBusError & Other Kool Tools by Greg Marriott
http://www.spies.com/~greg/tools.html
About QC...
http://www.onyx-tech.com/faq/current_QC_faq.html
Dave Evans & DavesBetterBusError
http://ng.netgate.net/~tilde/mechanic/
YEBBE & Tidy Heap
ftp://ftp.mactech.com//mactech/src/13.05/

Parting Shots

Next month MacTech Online is going to get serious about Java -- really. One last debugging tool you should check out before then is the Zone Ranger. Zone Ranger is a valuable tool for the counts and total sizes of the free blocks, pointers, handles, locked handles, purgeable handles, and resource handles that can be found on the Metrowerks web site. See you next month.

-- nick.c <online@mactech.com>

Joshua Golub's Zone Ranger
http://www.metrowerks.com/tools/software/zoneranger.html
 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Combo Quest (Games)
Combo Quest 1.0 Device: iOS Universal Category: Games Price: $.99, Version: 1.0 (iTunes) Description: Combo Quest is an epic, time tap role-playing adventure. In this unique masterpiece, you are a knight on a heroic quest to retrieve... | Read more »
Hero Emblems (Games)
Hero Emblems 1.0 Device: iOS Universal Category: Games Price: $2.99, Version: 1.0 (iTunes) Description: ** 25% OFF for a limited time to celebrate the release ** ** Note for iPhone 6 user: If it doesn't run fullscreen on your device... | Read more »
Puzzle Blitz (Games)
Puzzle Blitz 1.0 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0 (iTunes) Description: Puzzle Blitz is a frantic puzzle solving race against the clock! Solve as many puzzles as you can, before time runs out! You have... | Read more »
Sky Patrol (Games)
Sky Patrol 1.0.1 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0.1 (iTunes) Description: 'Strategic Twist On The Classic Shooter Genre' - Indie Game Mag... | Read more »
The Princess Bride - The Official Game...
The Princess Bride - The Official Game 1.1 Device: iOS Universal Category: Games Price: $3.99, Version: 1.1 (iTunes) Description: An epic game based on the beloved classic movie? Inconceivable! Play the world of The Princess Bride... | Read more »
Frozen Synapse (Games)
Frozen Synapse 1.0 Device: iOS iPhone Category: Games Price: $2.99, Version: 1.0 (iTunes) Description: Frozen Synapse is a multi-award-winning tactical game. (Full cross-play with desktop and tablet versions) 9/10 Edge 9/10 Eurogamer... | Read more »
Space Marshals (Games)
Space Marshals 1.0.1 Device: iOS Universal Category: Games Price: $4.99, Version: 1.0.1 (iTunes) Description: ### IMPORTANT ### Please note that iPhone 4 is not supported. Space Marshals is a Sci-fi Wild West adventure taking place... | Read more »
Battle Slimes (Games)
Battle Slimes 1.0 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0 (iTunes) Description: BATTLE SLIMES is a fun local multiplayer game. Control speedy & bouncy slime blobs as you compete with friends and family.... | Read more »
Spectrum - 3D Avenue (Games)
Spectrum - 3D Avenue 1.0 Device: iOS Universal Category: Games Price: $2.99, Version: 1.0 (iTunes) Description: "Spectrum is a pretty cool take on twitchy/reaction-based gameplay with enough complexity and style to stand out from the... | Read more »
Drop Wizard (Games)
Drop Wizard 1.0 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0 (iTunes) Description: Bring back the joy of arcade games! Drop Wizard is an action arcade game where you play as Teo, a wizard on a quest to save his... | Read more »

Price Scanner via MacPrices.net

Apple’s M4 Mac minis on sale for record-low p...
B&H Photo has M4 and M4 Pro Mac minis in stock and on sale right now for up to $150 off Apple’s MSRP, each including free 1-2 day shipping to most US addresses. Prices start at only $469: – M4... Read more
Deal Alert! Mac Studio with M4 Max CPU on sal...
B&H Photo has the standard-configuration Mac Studio model with Apple’s M4 Max CPU in stock today and on sale for $300 off MSRP, now $1699 (10-Core CPU and 32GB RAM/512GB SSD). B&H also... Read more

Jobs Board

All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.