Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:arch_bp_generic_fields

Proto:int arch_bp_generic_fields(int x86_len, int x86_type, int *gen_len, int *gen_type)

Type:int

Parameter:

TypeParameterName
intx86_len
intx86_type
int *gen_len
int *gen_type
185  Case x86_type == rigger on instruction execute
186  If x86_len != Available HW breakpoint length encodings Then Return -EINVAL
189  gen_type = HW_BREAKPOINT_X
190  gen_len = sizeof(long)
191  Return 0
192  Case x86_type == rigger on memory write
193  gen_type = HW_BREAKPOINT_W
194  Break
195  Case x86_type == rigger on memory read or write
196  gen_type = HW_BREAKPOINT_W | HW_BREAKPOINT_R
197  Break
198  Default
199  Return -EINVAL
203  len = arch_bp_generic_len(x86_len)
204  If len < 0 Then Return -EINVAL
206  gen_len = len
208  Return 0
Caller
NameDescribe
ptrace_fill_bp_fields