Subversion Repositories HelenOS

Rev

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

Rev 4342 Rev 4343
Line 62... Line 62...
62
    .description = "Print breakpoint table.",
62
    .description = "Print breakpoint table.",
63
    .func = cmd_print_breakpoints,
63
    .func = cmd_print_breakpoints,
64
    .argc = 0,
64
    .argc = 0,
65
};
65
};
66
 
66
 
67
#ifndef CONFIG_DEBUG_AS_WATCHPOINT
-
 
68
 
-
 
69
static int cmd_del_breakpoint(cmd_arg_t *argv);
67
static int cmd_del_breakpoint(cmd_arg_t *argv);
70
static cmd_arg_t del_argv = {
68
static cmd_arg_t del_argv = {
71
    .type = ARG_TYPE_INT
69
    .type = ARG_TYPE_INT
72
};
70
};
73
static cmd_info_t delbkpt_info = {
71
static cmd_info_t delbkpt_info = {
Line 99... Line 97...
99
    .func = cmd_add_breakpoint,
97
    .func = cmd_add_breakpoint,
100
    .argc = 1,
98
    .argc = 1,
101
    .argv = &addw_argv
99
    .argv = &addw_argv
102
};
100
};
103
 
101
 
104
#endif /* CONFIG_DEBUG_AS_WATCHPOINT */
-
 
105
#endif /* CONFIG_KCONSOLE */
102
#endif /* CONFIG_KCONSOLE */
106
 
103
 
107
/* Setup DR register according to table */
104
/* Setup DR register according to table */
108
static void setup_dr(int curidx)
105
static void setup_dr(int curidx)
109
{
106
{
Line 318... Line 315...
318
#ifdef CONFIG_KCONSOLE
315
#ifdef CONFIG_KCONSOLE
319
    cmd_initialize(&bkpts_info);
316
    cmd_initialize(&bkpts_info);
320
    if (!cmd_register(&bkpts_info))
317
    if (!cmd_register(&bkpts_info))
321
        printf("Cannot register command %s\n", bkpts_info.name);
318
        printf("Cannot register command %s\n", bkpts_info.name);
322
 
319
 
323
#ifndef CONFIG_DEBUG_AS_WATCHPOINT
-
 
324
    cmd_initialize(&delbkpt_info);
320
    cmd_initialize(&delbkpt_info);
325
    if (!cmd_register(&delbkpt_info))
321
    if (!cmd_register(&delbkpt_info))
326
        printf("Cannot register command %s\n", delbkpt_info.name);
322
        printf("Cannot register command %s\n", delbkpt_info.name);
327
 
323
 
328
    cmd_initialize(&addbkpt_info);
324
    cmd_initialize(&addbkpt_info);
Line 330... Line 326...
330
        printf("Cannot register command %s\n", addbkpt_info.name);
326
        printf("Cannot register command %s\n", addbkpt_info.name);
331
 
327
 
332
    cmd_initialize(&addwatchp_info);
328
    cmd_initialize(&addwatchp_info);
333
    if (!cmd_register(&addwatchp_info))
329
    if (!cmd_register(&addwatchp_info))
334
        printf("Cannot register command %s\n", addwatchp_info.name);
330
        printf("Cannot register command %s\n", addwatchp_info.name);
335
#endif /* CONFIG_DEBUG_AS_WATCHPOINT */
-
 
336
#endif /* CONFIG_KCONSOLE */
331
#endif /* CONFIG_KCONSOLE */
337
   
332
   
338
    exc_register(VECTOR_DEBUG, "debugger", debug_exception);
333
    exc_register(VECTOR_DEBUG, "debugger", debug_exception);
339
#ifdef CONFIG_SMP
334
#ifdef CONFIG_SMP
340
    exc_register(VECTOR_DEBUG_IPI, "debugger_smp", debug_ipi);
335
    exc_register(VECTOR_DEBUG_IPI, "debugger_smp", debug_ipi);
Line 376... Line 371...
376
 
371
 
377
        }
372
        }
378
    return 1;
373
    return 1;
379
}
374
}
380
 
375
 
381
#ifndef CONFIG_DEBUG_AS_WATCHPOINT
-
 
382
 
-
 
383
/** Remove breakpoint from table */
376
/** Remove breakpoint from table */
384
int cmd_del_breakpoint(cmd_arg_t *argv)
377
int cmd_del_breakpoint(cmd_arg_t *argv)
385
{
378
{
386
    unative_t bpno = argv->intval;
379
    unative_t bpno = argv->intval;
387
    if (bpno > BKPOINTS_MAX) {
380
    if (bpno > BKPOINTS_MAX) {
Line 410... Line 403...
410
    else
403
    else
411
        printf("Added breakpoint %d.\n", id);
404
        printf("Added breakpoint %d.\n", id);
412
   
405
   
413
    return 1;
406
    return 1;
414
}
407
}
415
#endif /* CONFIG_DEBUG_AS_WATCHPOINT */
-
 
416
#endif /* CONFIG_KCONSOLE */
408
#endif /* CONFIG_KCONSOLE */
417
 
409
 
418
/** @}
410
/** @}
419
 */
411
 */