Files | |
file | debugger.h |
file | debugger.c |
Data Structures | |
struct | bpinfo_t |
Defines | |
#define | BKPOINTS_MAX 4 |
#define | BKPOINT_INSTR 0x1 |
#define | BKPOINT_WRITE 0x2 |
#define | BKPOINT_READ_WRITE 0x4 |
#define | BKPOINT_CHECK_ZERO 0x8 |
#define | getip(x) ((x)->eip) |
Functions | |
void | debugger_init (void) |
int | breakpoint_add (void *where, int flags, int curidx) |
void | breakpoint_del (int slot) |
SPINLOCK_INITIALIZE (bkpoint_lock) | |
static int | cmd_print_breakpoints (cmd_arg_t *argv) |
static int | cmd_del_breakpoint (cmd_arg_t *argv) |
static int | cmd_add_breakpoint (cmd_arg_t *argv) |
static void | setup_dr (int curidx) |
static void | handle_exception (int slot, istate_t *istate) |
static void | debug_exception (int n, istate_t *istate) |
static void | debug_ipi (int n, istate_t *istate) |
Variables | |
static bpinfo_t | breakpoints [BKPOINTS_MAX] |
static cmd_info_t | bkpts_info |
static cmd_arg_t | del_argv |
static cmd_info_t | delbkpt_info |
static cmd_arg_t | add_argv |
static cmd_info_t | addbkpt_info |
static cmd_arg_t | addw_argv |
static cmd_info_t | addwatchp_info |
|
Definition at line 47 of file debugger.h. Referenced by before_thread_runs_arch(), and handle_exception(). |
|
Definition at line 43 of file debugger.h. Referenced by breakpoint_add(), cmd_add_breakpoint(), handle_exception(), and setup_dr(). |
|
Definition at line 45 of file debugger.h. Referenced by breakpoint_add(), and setup_dr(). |
|
Definition at line 44 of file debugger.h. Referenced by before_thread_runs_arch(), breakpoint_add(), cmd_add_breakpoint(), and setup_dr(). |
|
Definition at line 40 of file debugger.h. Referenced by before_thread_runs_arch(), breakpoint_add(), cmd_del_breakpoint(), cmd_print_breakpoints(), debug_exception(), debug_ipi(), and debugger_init(). |
|
Definition at line 228 of file debugger.c. Referenced by handle_exception(). |
|
Enable hardware breakpoint
Definition at line 181 of file debugger.c. References ASSERT, BKPOINT_INSTR, BKPOINT_READ_WRITE, BKPOINT_WRITE, BKPOINTS_MAX, breakpoints, interrupts_disable(), interrupts_restore(), spinlock_lock, and spinlock_unlock(). Referenced by before_thread_runs_arch(), and cmd_add_breakpoint(). Here is the call graph for this function: |
|
Definition at line 255 of file debugger.c. References bpinfo_t::address, breakpoints, interrupts_disable(), interrupts_restore(), NULL, setup_dr(), spinlock_lock, and spinlock_unlock(). Referenced by cmd_del_breakpoint(). Here is the call graph for this function: |
|
Add new breakpoint to table Definition at line 295 of file debugger.c. References add_argv, BKPOINT_INSTR, BKPOINT_WRITE, breakpoint_add(), cmd_arg::intval, and printf(). Here is the call graph for this function: |
|
Remove breakpoint from table Definition at line 284 of file debugger.c. References BKPOINTS_MAX, breakpoint_del(), cmd_arg::intval, and printf(). Here is the call graph for this function: |
|
Print table of active breakpoints Definition at line 105 of file debugger.c. References BKPOINTS_MAX, breakpoints, get_symtab_entry(), and printf(). Here is the call graph for this function: |
|
Definition at line 316 of file debugger.c. References BKPOINTS_MAX, handle_exception(), istate::rflags, and RFLAGS_RF. Referenced by debugger_init(). Here is the call graph for this function: |
|
Definition at line 340 of file debugger.c. References BKPOINTS_MAX, setup_dr(), spinlock_lock, and spinlock_unlock(). Referenced by debugger_init(). Here is the call graph for this function: |
|
Initialize debugger Definition at line 352 of file debugger.c. References addbkpt_info, addwatchp_info, BKPOINTS_MAX, bkpts_info, breakpoints, cmd_initialize(), cmd_register(), debug_exception(), debug_ipi(), delbkpt_info, exc_register(), cmd_info::name, NULL, panic, VECTOR_DEBUG, and VECTOR_DEBUG_IPI. Referenced by arch_post_mm_init(). Here is the call graph for this function: |
|
Definition at line 231 of file debugger.c. References ASSERT, atomic_set(), BKPOINT_CHECK_ZERO, BKPOINT_INSTR, breakpoints, get_symtab_entry(), getip, haltstate, kconsole(), and printf(). Referenced by debug_exception(). Here is the call graph for this function: |
|
Definition at line 123 of file debugger.c. References bpinfo_t::address, BKPOINT_INSTR, BKPOINT_READ_WRITE, BKPOINT_WRITE, breakpoints, and bpinfo_t::flags. Referenced by breakpoint_del(), and debug_ipi(). |
|
|
|
Initial value: { .type = ARG_TYPE_INT } Definition at line 80 of file debugger.c. Referenced by cmd_add_breakpoint(). |
|
Initial value: { .name = "addbkpt", .description = "addbkpt <&symbol> - new breakpoint.", .func = cmd_add_breakpoint, .argc = 1, .argv = &add_argv } Definition at line 83 of file debugger.c. Referenced by debugger_init(). |
|
Initial value: { .type = ARG_TYPE_INT } Definition at line 91 of file debugger.c. |
|
Initial value: { .name = "addwatchp", .description = "addbwatchp <&symbol> - new write watchpoint.", .func = cmd_add_breakpoint, .argc = 1, .argv = &addw_argv } Definition at line 94 of file debugger.c. Referenced by debugger_init(). |
|
Initial value: { .name = "bkpts", .description = "Print breakpoint table.", .func = cmd_print_breakpoints, .argc = 0, } Definition at line 58 of file debugger.c. Referenced by debugger_init(). |
|
Definition at line 54 of file debugger.c. Referenced by breakpoint_add(), breakpoint_del(), cmd_print_breakpoints(), debugger_init(), handle_exception(), and setup_dr(). |
|
Initial value: { .type = ARG_TYPE_INT } Definition at line 68 of file debugger.c. |
|
Initial value: { .name = "delbkpt", .description = "delbkpt <number> - Delete breakpoint.", .func = cmd_del_breakpoint, .argc = 1, .argv = &del_argv } Definition at line 71 of file debugger.c. Referenced by debugger_init(). |