Subversion Repositories HelenOS

Rev

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

Rev 3665 Rev 3742
Line 107... Line 107...
107
{
107
{
108
    fault_if_from_uspace(istate, "Unhandled exception %d.", n);
108
    fault_if_from_uspace(istate, "Unhandled exception %d.", n);
109
    panic("Unhandled exception %d.", n);
109
    panic("Unhandled exception %d.", n);
110
}
110
}
111
 
111
 
-
 
112
#ifdef CONFIG_KCONSOLE
-
 
113
 
112
/** kconsole cmd - print all exceptions */
114
/** kconsole cmd - print all exceptions */
113
static int exc_print_cmd(cmd_arg_t *argv)
115
static int cmd_exc_print(cmd_arg_t *argv)
114
{
116
{
115
#if (IVT_ITEMS > 0)
117
#if (IVT_ITEMS > 0)
116
    unsigned int i;
118
    unsigned int i;
117
    char *symbol;
119
    char *symbol;
118
 
120
 
Line 156... Line 158...
156
#endif
158
#endif
157
   
159
   
158
    return 1;
160
    return 1;
159
}
161
}
160
 
162
 
-
 
163
 
161
static cmd_info_t exc_info = {
164
static cmd_info_t exc_info = {
162
    .name = "exc",
165
    .name = "exc",
163
    .description = "Print exception table.",
166
    .description = "Print exception table.",
164
    .func = exc_print_cmd,
167
    .func = cmd_exc_print,
165
    .help = NULL,
168
    .help = NULL,
166
    .argc = 0,
169
    .argc = 0,
167
    .argv = NULL
170
    .argv = NULL
168
};
171
};
169
 
172
 
-
 
173
#endif
-
 
174
 
170
/** Initialize generic exception handling support */
175
/** Initialize generic exception handling support */
171
void exc_init(void)
176
void exc_init(void)
172
{
177
{
173
    int i;
178
    int i;
174
 
179
 
175
    for (i = 0; i < IVT_ITEMS; i++)
180
    for (i = 0; i < IVT_ITEMS; i++)
176
        exc_register(i, "undef", (iroutine) exc_undef);
181
        exc_register(i, "undef", (iroutine) exc_undef);
177
 
182
 
-
 
183
#ifdef CONFIG_KCONSOLE
178
    cmd_initialize(&exc_info);
184
    cmd_initialize(&exc_info);
179
    if (!cmd_register(&exc_info))
185
    if (!cmd_register(&exc_info))
180
        panic("could not register command %s\n", exc_info.name);
186
        printf("Cannot register command %s\n", exc_info.name);
-
 
187
#endif
181
}
188
}
182
 
189
 
183
/** @}
190
/** @}
184
 */
191
 */