Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\debug\kdb\kdb_bp.c Create Date:2022-07-28 11:44:06
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:_kdb_bp_install

Proto:static int _kdb_bp_install(struct pt_regs *regs, kdb_bp_t *bp)

Type:int

Parameter:

TypeParameterName
struct pt_regs *regs
kdb_bp_t *bp
132  If KDB_DEBUG(BP) Then kdb_printf("%s: bp_installed %d\n", __func__, Breakpoint is installed )
135  If Not KDB_STATE(SSBPT) Then Do delayed bp handling = 0
137  If Breakpoint is installed Then Return 1
139  If Do delayed bp handling || Delayed breakpoint && KDB_STATE(DOING_SS) Then
140  If KDB_DEBUG(BP) Then kdb_printf("%s: delayed bp\n", __func__)
142  kdb_handle_bp(regs, bp)
143  Return 0
145  If Not Uses hardware register Then ret = dbg_set_sw_break( Address breakpoint is present at )
147  Else ret = set_hw_breakpoint( Address breakpoint is present at , HW break length , Uses hardware register )
151  If ret == 0 Then
152  Breakpoint is installed = 1
153  Else
154  kdb_printf("%s: failed to set breakpoint at 0x%lx\n", __func__, Address breakpoint is present at )
156  If Not Uses hardware register Then
157  kdb_printf("Software breakpoints are unavailable.\n Boot the kernel with rodata=off\n OR use hw breaks: help bph\n")
161  Return 1
163  Return 0
Caller
NameDescribe
kdb_bp_installkdb_bp_install* Install kdb_breakpoints prior to returning from the* kernel debugger. This allows the kdb_breakpoints to be set* upon functions that are used internally by kdb, such as* printk(). This function is only called once per kdb session.