The DeBug Menu |
November, 11, 2002 7:53 AM |
plm51 |
Originally posted to: (Unsupported OS X) after hearing a radio archive saturday night on "MacRadio" Ryan Rempel was a featured guest, it was interesting hearing him speak about his project "Xpostfacto", I thought about writing to ask about the "Debug" menu selection...it is for me an unknown area of the program. Can anyone "define" those selections under "Debug" and how they enhance/help the install process? Thank's Phil Meza |
. |
RE: The DeBug Menu |
November, 12, 2002 9:53 PM |
ed |
. |
They only help diagnose problems in the kernel, which are of interest to Ryan (to help support XPostFacto - he may request that you turn on one or more of the options and collect information) and to the Open Source developers who work on Darwin, the Unix foundation that OS X is built upon. There is no way to "break into" the boot sequence of OS X unless you set some bits in the Mac's non-volatile RAM. Why would you want to do this? For example, if there is a problem that crashes the system before the very first screen appears, you would want to walk the computer through those early steps to isolate the problem. How would you set bits in NVRAM? Not easily, since the "Old World" Macs do not have a control panel for this, or a convenient way to accept keyboard commands before startup. The debug menu has an item for each one of the 8 flag bits currently known to Mac OS X. I'm not sure that even Ryan has used them all, but I'm sure there is a driver developer out there who really appreciates having the particular bit he/she can't do without. Early breakpoint crashes the kernel almost immediately after it's read into memory and begins executing. If you have a debugger built into the kernel, you can then single step through the kernel, set breakpoints, examine and alter memory locations, etc. For most of us, who do not have a debugger installed, this means getting a panic message and a locked-up system that can be restarted only by clearing out the parameter RAM (you have to hold down so many keys at just the right moment that you almost need three hands). For developers of kernel extensions (like Ryan), it can be indispensable. Enable kprintf allows the kernel to send messages to the console before the normal message-printing program (syslog) has started up. This will send lots of progress reports to the console that are useful if the system crash occurs before syslog had a chance to start up. Notice I said "console" and not "monitor screen" - most of the "Old World" systems can only use this capability conveniently by attaching a terminal to one of the serial ports. Debugger ARP allows a computer attached to the same ethernet to act as a console using the Telnet program, so it doesn't have to be plugged into a serial port as mentioned above. Extra diagnostics turns on messages that are normally suppressed. These will usually screw up the normal startup blue screen so that you have to click the mouse a few centimeters below the login or restart buttons, but in Single-User mode, these may be helpful. The other menu items? Not sure - someone who uses them will have to explain. Single user mode (in the Advanced menu) is very useful to Unix users or those installing Darwin rather than the full OS X. It allows you to reset passwords, diagnose and repair disk and network problems, or fix problems with the GUI software or graphics system that prevent normal logins. Unless the problem occurs very early in the boot process, or is due to a bug in the kernel itself (or an extension), single user mode is usually all you need. The only problem is that there's no GUI, so when something scrolls off the screen, it's gone for good. That's where "Real" programmers :-) rely on emacs (if they're lucky) or simple editors (remember "ed"?) and very quick reflexes. Whether you understood any of this (assuming I didn't get it wrong) or not, or whether you ever use these capabilities or not, it's good to know that the features are there so that an OS X Guru (or THE OSXGuru) can solve a problem that can not be solved any other way. |
|
|