Function report |
Source Code:kernel\debug\kdb\kdb_debugger.c |
Create Date:2022-07-28 11:44:31 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:kdb_stub
Proto:int kdb_stub(struct kgdb_state *ks)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct kgdb_state * | ks |
| 55 | error = 0 |
| 57 | addr = kgdb_arch_pc(ex_vector, linux_regs) |
| 59 | db_result = KDB_DB_NOBPT |
| 68 | pass_exception = 0 |
| 69 | If atomic_read( & kgdb_setting_breakpoint) Then reason = Keyboard entry - regs valid |
| 72 | If err_code == In NMI due to SYSTEM cmd; regs valid && signo == SIGTRAP Then reason = In NMI due to SYSTEM cmd; regs valid |
| 75 | Else if in_nmi() Then reason = Non-maskable interrupt; regs valid |
| 79 | If Breakpoint is active in register && Address breakpoint is present at == addr Then |
| 81 | db_result = Breakpoint |
| 82 | If addr != instruction_pointer(linux_regs) Then kgdb_arch_set_pc(linux_regs, addr) |
| 84 | Break |
| 87 | If reason == Breakpoint inst. - regs valid || reason == CPU switch - regs valid Then |
| 89 | If This entry is available Then Continue |
| 91 | If Address breakpoint is present at == addr Then |
| 92 | Do delayed bp handling = 1 |
| 93 | Delayed breakpoint = 1 |
| 102 | db_result = Breakpoint |
| 103 | KDB_STATE_SET(SSBPT) |
| 104 | Break |
| 109 | If reason != Breakpoint inst. - regs valid && ex_vector == 0 && signo == SIGTRAP Then |
| 112 | db_result = Breakpoint |
| 116 | kdb_common_init_state(ks) |
| 119 | KDB_STATE_CLEAR(DOING_SS) |
| 120 | KDB_STATE_SET(PAGER) |
| 121 | If err_code == DIE_OOPS || reason == Kernel Oops - regs valid Then |
| 122 | pass_exception = 1 |
| 123 | KDB_FLAG_SET(CATASTROPHIC) |
| 126 | for_each_online_cpu(i) |
| 127 | If Not enter_kgdb Then KDB_FLAG_SET(CATASTROPHIC) |
| 129 | If KDB_STATE(SSBPT) && reason == Single Step trap. - regs valid Then |
| 130 | KDB_STATE_CLEAR(SSBPT) |
| 131 | KDB_STATE_CLEAR(DOING_SS) |
| 132 | Else |
| 141 | kdb_common_deinit_state() |
| 142 | KDB_STATE_CLEAR(PAGER) |
| 143 | kdbnearsym_cleanup() |
| 144 | If error == KDB_CMD_KGDB Then |
| 145 | If KDB_STATE(DOING_KGDB) Then KDB_STATE_CLEAR(DOING_KGDB) |
| 152 | If KDB_STATE(DOING_SS) Then gdbstub_state(ks, "s") |
| 154 | Else gdbstub_state(ks, "c") |
| 160 | ret_state = gdbstub_state(ks, "e") |
| 161 | If pass_exception Then ret_state = 1 |
| 163 | If error == KDB_CMD_CPU Then |
| 173 | Return ret_state |
| Name | Describe |
|---|---|
| kgdb_cpu_enter |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |