Monday, November 23, 2009

Identifying Where The Illegal Instruction Is

I am debugging an application which generates illegal instruction error for unknown reason and under unknown conditions. Some one pointed me to a web page for root causing it. Here is how:

1. Enable CONFIG_DEBUG_USER feature in the kernel.
2. Set the kernel variable user_debug to 1 (only bit 0 matters in debugging this problem).
3. Do the test.

One thing not so important here, lxr seems to have trouble location user_debug in the kernel source tree it has cross-referenced. But it ought to.

No comments: