13.03.2013 Views

Hacking the Xbox

Hacking the Xbox

Hacking the Xbox

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

APPENDIX E<br />

Debugging:<br />

Hints and Tips<br />

Don’t Panic!<br />

Developing your debugging skills is as important, if not more important,<br />

than developing your design skills. The most important single piece of<br />

advice is to never panic: randomly tweaking and changing things will<br />

introduce more uncertainty and bugs than it will fix.<br />

Debugging is simple when given total visibility into a system and total<br />

knowledge of <strong>the</strong> expected state of a properly working system. Simply<br />

comparing <strong>the</strong> observed state against <strong>the</strong> expected state will elucidate what<br />

went wrong. Unfortunately, <strong>the</strong> world rarely works this way. Chips are black<br />

boxes, and <strong>the</strong> only visibility into <strong>the</strong> internal state of <strong>the</strong> chip is through its<br />

pins. Many signals are also too difficult to directly measure or record. Also,<br />

<strong>the</strong> specifications provided by manufacturers are often vague or difficult to<br />

interpret. Thus, <strong>the</strong> real art of debugging is in tracing a set of symptoms to<br />

a root cause despite a lack of visibility and total system knowledge.<br />

Understand <strong>the</strong> System<br />

Trying to debug a system without first understanding what you are trying to<br />

debug is like trying to read a Japanese comic without any knowledge of<br />

Japanese. You can figure out at a superficial level who is <strong>the</strong> bad guy and<br />

who is <strong>the</strong> good guy, but you get really lost as to exactly what <strong>the</strong> floating cat<br />

has to do with all of it. In order to fully understand <strong>the</strong> plot, you need a<br />

Japanese dictionary and a lot of time and patience. Similarly, basic electronics<br />

principles and intuition will get you to <strong>the</strong> point where you know roughly

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!