Ignore:
File:
1 edited

Legend:

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

    r98000fb ra000878c  
    5353#include <ddi/irq.h>
    5454#include <symtab.h>
     55#include <stacktrace.h>
    5556
    5657/*
     
    6465void decode_istate(istate_t *istate)
    6566{
    66         char *symbol;
    67 
    68         symbol = symtab_fmt_name_lookup(istate->eip);
    69 
     67        const char *symbol = symtab_fmt_name_lookup(istate->eip);
     68       
    7069        if (CPU)
    7170                printf("----------------EXCEPTION OCCURED (cpu%u)----------------\n", CPU->id);
    7271        else
    7372                printf("----------------EXCEPTION OCCURED----------------\n");
    74                
     73       
    7574        printf("%%eip: %#lx (%s)\n", istate->eip, symbol);
    7675        printf("ERROR_WORD=%#lx\n", istate->error_word);
     
    7978        printf("stack: %#lx, %#lx, %#lx, %#lx\n", istate->stack[0], istate->stack[1], istate->stack[2], istate->stack[3]);
    8079        printf("       %#lx, %#lx, %#lx, %#lx\n", istate->stack[4], istate->stack[5], istate->stack[6], istate->stack[7]);
     80       
     81        stack_trace_istate(istate);
    8182}
    8283
     
    9697        decode_istate(istate);
    9798        panic("Unserviced interrupt: %d.", n);
     99}
     100
     101static void de_fault(int n, istate_t *istate)
     102{
     103        fault_if_from_uspace(istate, "Divide error.");
     104
     105        decode_istate(istate);
     106        panic("Divide error.");
    98107}
    99108
     
    215224        }
    216225       
     226        exc_register(0, "de_fault", (iroutine) de_fault);
    217227        exc_register(7, "nm_fault", (iroutine) nm_fault);
    218228        exc_register(12, "ss_fault", (iroutine) ss_fault);
Note: See TracChangeset for help on using the changeset viewer.