Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 4491338 in mainline for kernel/arch/amd64/src/interrupt.c


Ignore:
Timestamp:
2009-12-13T20:01:38Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
47a350f
Parents:
963dd91
Message:

Recognize the Division Error fault on ia32 and amd64.
Now when an application divides e.g. by zero, it will be killed with an
appropriate message (i.e. "Division error.") instead of dummy
"Unserviced interrupt: 0".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/interrupt.c

    r963dd91 r4491338  
    9898}
    9999
     100static void de_fault(int n, istate_t *istate)
     101{
     102        fault_if_from_uspace(istate, "Divide error.");
     103        decode_istate(n, istate);
     104        panic("Divide error.");
     105}
     106
    100107/** General Protection Fault. */
    101108static void gp_fault(int n, istate_t *istate)
     
    200207        }
    201208       
     209        exc_register(0, "de_fault", (iroutine) de_fault);
    202210        exc_register(7, "nm_fault", (iroutine) nm_fault);
    203211        exc_register(12, "ss_fault", (iroutine) ss_fault);
Note: See TracChangeset for help on using the changeset viewer.