3 ms·
How do OS developers typically debug this sort of thing? Do they attach external hardware to step through, or is it serial logging?
by topbanana 13y ago
How do OS developers typically debug this sort of thing? Do they attach external hardware to step through, or is it serial logging?
- dmytrish 13y agoFrom my small OSdev experience: write printf before anything else (it's not that hard, just write bytes into *0xB8000). This can be done even before getting any interrupts working, fortunately (without interrupts any input is almost impossible, I don't want to talk about polling).
- pwg 13y agoI found a race condition in the Linux kernel once (0.8x days) that was partially triggered due to an off brand 80387 (FPU) chip using the ibm-pc speaker hardware. The cycle was: 1) insert ioout to turn on speaker at code line X; 2) compile kernel 3) cause lockup 4) is speaker on or off? 4a) on, move ioout to a later code section; 4b) off, move ioout to an earlier code section; Essentially, a binary type search through the code, using the on/off state of the speaker hardware to narrow the search. Turned out a lock needed to be one line later in ll_read_write_page.c (if I remember that file name correctly). So, the answer to "how do you debug" is: "with anything you can make use of".