Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\kgdb.c Create Date:2022-07-28 08:40:47
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:kgdb_set_hw_break

Proto:static int kgdb_set_hw_break(unsigned long addr, int len, enum kgdb_bptype bptype)

Type:int

Parameter:

TypeParameterName
unsigned longaddr
intlen
enum kgdb_bptypebptype
325  When i < Total number of available HW breakpoint registers cycle If Not enabled Then
327  Break
328  If i == Total number of available HW breakpoint registers Then Return -1
332  Case bptype == BP_HARDWARE_BREAKPOINT
333  len = 1
334  type = rigger on instruction execute
335  Break
336  Case bptype == BP_WRITE_WATCHPOINT
337  type = rigger on memory write
338  Break
339  Case bptype == BP_ACCESS_WATCHPOINT
340  type = rigger on memory read or write
341  Break
342  Default
343  Return -1
346  Case len == 1
348  Break
349  Case len == 2
351  Break
352  Case len == 4
354  Break
356  Case len == 8
358  Break
360  Default
361  Return -1
363  addr = addr
364  If hw_break_reserve_slot(i) Then
365  addr = 0
366  Return -1
368  enabled = 1
370  Return 0