Subversion Repositories HelenOS-historic

Rev

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

Rev 623 Rev 664
Line 72... Line 72...
72
 */
72
 */
73
void exc_dispatch(int n, void *stack)
73
void exc_dispatch(int n, void *stack)
74
{
74
{
75
    ASSERT(n < IVT_ITEMS);
75
    ASSERT(n < IVT_ITEMS);
76
   
76
   
77
    exc_table[n].f(n, stack);
77
    exc_table[n].f(n + IVT_FIRST, stack);
78
}
78
}
79
 
79
 
80
/** Default 'null' exception handler */
80
/** Default 'null' exception handler */
81
static void exc_undef(int n, void *stack)
81
static void exc_undef(int n, void *stack)
82
{
82
{
83
    panic("Unhandled exception %d.", n);
83
    panic("Unhandled exception %d.", n);
84
}
84
}
85
 
85
 
86
/** KConsole cmd - print all exceptions */
86
/** kconsole cmd - print all exceptions */
87
static int exc_print_cmd(cmd_arg_t *argv)
87
static int exc_print_cmd(cmd_arg_t *argv)
88
{
88
{
89
    int i;
89
    int i;
90
    char *symbol;
90
    char *symbol;
91
 
91
 
Line 93... Line 93...
93
    printf("Exc Description Handler\n");
93
    printf("Exc Description Handler\n");
94
    for (i=0; i < IVT_ITEMS; i++) {
94
    for (i=0; i < IVT_ITEMS; i++) {
95
        symbol = get_symtab_entry((__native)exc_table[i].f);
95
        symbol = get_symtab_entry((__native)exc_table[i].f);
96
        if (!symbol)
96
        if (!symbol)
97
            symbol = "not found";
97
            symbol = "not found";
98
        printf("%d %s 0x%p(%s)\n",i,exc_table[i].name,
98
        printf("%d %s 0x%p(%s)\n", i + IVT_FIRST, exc_table[i].name,
99
               exc_table[i].f,symbol);     
99
               exc_table[i].f,symbol);     
100
        if (!((i+1) % 20)) {
100
        if (!((i+1) % 20)) {
101
            printf("Press any key to continue.");
101
            printf("Press any key to continue.");
102
            spinlock_unlock(&exctbl_lock);
102
            spinlock_unlock(&exctbl_lock);
103
            getc(stdin);
103
            getc(stdin);