Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Macbugs for osx?

Macbugs for osx?
Thread Tools
Fresh-Faced Recruit
Join Date: Oct 2000
Status: Offline
Reply With Quote
May 20, 2001, 04:25 PM
 
I was wondering if macbugs or some other debugging tool is working under osx.

I need to find out where files are written by different programs/routines.

Preferably the capabilty of single stepping though a app.

Any Ideas?
     
Mac Elite
Join Date: Oct 2000
Location: Edinburgh, Scotland
Status: Offline
Reply With Quote
May 20, 2001, 05:09 PM
 
Not quite sure where you're heading with this one, but as a MacsBug replacement, I'd love to be able to hit cmd-power and drop into a full screen black and white terminal.

It'd have to be a non-maskable interrupt that once entered, masks all other interrupts so that I can kill rogue processes which are taking over the whole processor (ie. a thrashing process).

------------------
Artificial intelligence is no match for natural stupidity.

ClamXav - the free virus scanner for Mac OS X | Geobunny learns to fly
     
Fresh-Faced Recruit
Join Date: Jan 2001
Location: San Jose, CA USA
Status: Offline
Reply With Quote
May 21, 2001, 10:10 AM
 
"gdb", the standard Unix debugger, is the debugger for Mac OS X. Install the developer tools to get it. It's a command-line tool that you run from Terminal. You can give the path to the binary as the argument to "gdb" (not just the path to the app -- you need the .../Contents/MacOS/AppName part), or you can start gdb with no args and use the "attach" command with a process ID to attach to a running process.
The command line interface is as unintuitive as MacsBug and more intricate. On the plus side it doesn't take over the whole machine, which is nice, and it can do full source level debugging if the symbols and source are available. It has a "help" command but the output is so terse as to be useless for newbies. I would suggest looking in a bookstore for books on Unix debugging.
Oh, one more thing: If you need to debug your own app, Project Builder has its own GUI front end to gdb that's a lot friendlier to use. It contains a gdb console for entering the more obscure commands, but basic stuff like stepping and looking at the stack and variables can be done in the GUI.
     
Fresh-Faced Recruit
Join Date: Jan 2001
Location: San Jose, CA USA
Status: Offline
Reply With Quote
May 21, 2001, 10:13 AM
 
You said you wanted to find where things are writing files. Take a look at the fs_usage command, which dumps a log of all the filesystem activity generated by a process. It might do what you want. You do have to be root to run it, though, since it spies on other processes. I believe it has a man page; else the main thing you need to know is to enter "sudo fs_usage processid" where 'processid' is the process ID you want to investigate.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:11 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2