I'm having some trouble getting my kernel to handle exceptions. I set up the IDT and the handlers. I also used sti to enable interrupts. When I use the instruction "int" with a code that I have a handler for, it works. Also, my timer handler works and is called as expected. The problem is that I can't force the system to throw an exception. For example, if I divide by zero or try to cause a page fault, nothing happens. However, if I manually call "int 14" the page fault handler gets called. Any ideas of what might be happening? Thanks.
EDIT: Ok dumb mistake. GCC optimizations must have been omitting my divide by zeros and invalid addresses because I didn't use the results anywhere in my code.