Rev 614 | Rev 958 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 614 | Rev 635 | ||
|---|---|---|---|
| Line 33... | Line 33... | ||
| 33 | #include <arch/exception.h> |
33 | #include <arch/exception.h> |
| 34 | #include <arch/types.h> |
34 | #include <arch/types.h> |
| 35 | 35 | ||
| 36 | #define BKPOINTS_MAX 10 |
36 | #define BKPOINTS_MAX 10 |
| 37 | 37 | ||
| - | 38 | #define BKPOINT_INPROG (1 << 0) /**< Breakpoint was shot */ |
|
| - | 39 | #define BKPOINT_ONESHOT (1 << 1) /**< One-time breakpoint,mandatory for j/b |
|
| - | 40 | instructions */ |
|
| - | 41 | #define BKPOINT_REINST (1 << 2) /**< Breakpoint is set on the next |
|
| - | 42 | instruction, so that it could be |
|
| - | 43 | reinstalled on the previous one */ |
|
| - | 44 | #define BKPOINT_FUNCCALL (1 << 3) /**< Call a predefined function */ |
|
| - | 45 | ||
| 38 | typedef struct { |
46 | typedef struct { |
| 39 | __address address; /**< Breakpoint address */ |
47 | __address address; /**< Breakpoint address */ |
| 40 | __native instruction; /**< Original instruction */ |
48 | __native instruction; /**< Original instruction */ |
| 41 | __native nextinstruction; /**< Original instruction following break */ |
49 | __native nextinstruction; /**< Original instruction following break */ |
| 42 | bool executing; /**< If we are executing the original instruciton */ |
50 | int flags; /**< Flags regarding breakpoint */ |
| - | 51 | count_t counter; |
|
| - | 52 | void (*bkfunc)(void *b, struct exception_regdump *pstate); |
|
| 43 | } bpinfo_t; |
53 | } bpinfo_t; |
| 44 | 54 | ||
| 45 | extern void debugger_init(void); |
55 | extern void debugger_init(void); |
| 46 | void debugger_bpoint(struct exception_regdump *pstate); |
56 | void debugger_bpoint(struct exception_regdump *pstate); |
| 47 | 57 | ||