Subversion Repositories HelenOS-historic

Rev

Rev 958 | Rev 1050 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 958 Rev 1021
Line 45... Line 45...
45
static void print_info_errcode(int n, istate_t *istate)
45
static void print_info_errcode(int n, istate_t *istate)
46
{
46
{
47
    char *symbol;
47
    char *symbol;
48
    __u64 *x = &istate->stack[0];
48
    __u64 *x = &istate->stack[0];
49
 
49
 
50
    if (!(symbol=get_symtab_entry(x[1])))
50
    if (!(symbol=get_symtab_entry(istate->rip)))
51
        symbol = "";
51
        symbol = "";
52
 
52
 
53
    printf("-----EXCEPTION(%d) OCCURED----- ( %s )\n",n,__FUNCTION__);
53
    printf("-----EXCEPTION(%d) OCCURED----- ( %s )\n",n, __FUNCTION__);
54
    printf("%%rip: %Q (%s)\n",istate->stack[1],symbol);
54
    printf("%%rip: %Q (%s)\n",istate->rip, symbol);
55
    printf("ERROR_WORD=%Q\n", istate->stack[0]);
55
    printf("ERROR_WORD=%Q\n", istate->error_word);
56
    printf("%%rcs=%Q,flags=%Q, %%cr0=%Q\n", istate->stack[2],
56
    printf("%%rcs=%Q, flags=%Q, %%cr0=%Q\n", istate->cs, istate->rflags,read_cr0());
57
           istate->stack[3],read_cr0());
-
 
58
    printf("%%rax=%Q, %%rbx=%Q, %%rcx=%Q\n",istate->rax,istate->rbx,istate->rcx);
57
    printf("%%rax=%Q, %%rbx=%Q, %%rcx=%Q\n",istate->rax,istate->rbx,istate->rcx);
59
    printf("%%rdx=%Q, %%rsi=%Q, %%rdi=%Q\n",istate->rdx,istate->rsi,istate->rdi);
58
    printf("%%rdx=%Q, %%rsi=%Q, %%rdi=%Q\n",istate->rdx,istate->rsi,istate->rdi);
60
    printf("%%r8 =%Q, %%r9 =%Q, %%r10=%Q\n",istate->r8,istate->r9,istate->r10);
59
    printf("%%r8 =%Q, %%r9 =%Q, %%r10=%Q\n",istate->r8,istate->r9,istate->r10);
61
    printf("%%r11=%Q, %%r12=%Q, %%r13=%Q\n",istate->r11,istate->r12,istate->r13);
60
    printf("%%r11=%Q, %%r12=%Q, %%r13=%Q\n",istate->r11,istate->r12,istate->r13);
62
    printf("%%r14=%Q, %%r15=%Q, %%rsp=%Q\n",istate->r14,istate->r15,&istate->stack[0]);
61
    printf("%%r14=%Q, %%r15=%Q, %%rsp=%Q\n",istate->r14,istate->r15,&istate->stack[0]);
Line 75... Line 74...
75
void (* enable_irqs_function)(__u16 irqmask) = NULL;
74
void (* enable_irqs_function)(__u16 irqmask) = NULL;
76
void (* eoi_function)(void) = NULL;
75
void (* eoi_function)(void) = NULL;
77
 
76
 
78
void null_interrupt(int n, istate_t *istate)
77
void null_interrupt(int n, istate_t *istate)
79
{
78
{
80
    printf("-----EXCEPTION(%d) OCCURED----- ( %s )\n",n,__FUNCTION__); \
-
 
81
    printf("stack: %X, %X, %X, %X\n", istate->stack[0], istate->stack[1],
-
 
82
           istate->stack[2], istate->stack[3]);
79
    print_info_errcode(n, istate);
83
    panic("unserviced interrupt\n");
80
    panic("unserviced interrupt\n");
84
}
81
}
85
 
82
 
86
void gp_fault(int n, istate_t *istate)
83
void gp_fault(int n, istate_t *istate)
87
{
84
{