Kernel Debugging: Difference between revisions

Jump to navigation Jump to search
m
[unchecked revision][unchecked revision]
mNo edit summary
Line 118:
Now, the Pros. First of all, you can use your favourite debugger. You can also use unit testing, for example, which is far better than testing software by hand, if you use the right method.
 
There are some Cons on this approach. For example, you are far from your target environment when you code like this. This is further aggravated by the fact that so-called ''freestanding'' environments are dramatically more sensiblesensitive to undefined behaviour, specially uninitialized variables. You can work around this limitation by asking the compiler to perform aggressive optimization while testing hosted, which make software more sensible to undefined behaviour, too. However, as the best debug environment is the final target environment, you will still want to test your code when you introduce in into your real kernel.
 
Another Con that will probably scare most people is that this approach requires you to consistently plan your interfaces beforehand. Depending on your specific requirements, you may still be able to avoid a too long planning phase. For example, if you want to throw away the hosted implementations once you get the modules working properly, then you don't have to bother maintaining the same interfaces forever.
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu