Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:kdb_getword - Read a binary value. Unlike kdb_getarea, this treats* data as numbers.* Inputs:* word Pointer to the word to receive the result.* addr Address of the area to copy.* size Size of the area.* Returns:* 0 for success, < 0 for error.

Proto:int kdb_getword(unsigned long *word, unsigned long addr, size_t size)

Type:int

Parameter:

TypeParameterName
unsigned long *word
unsigned longaddr
size_tsize
460  word = 0
462  Case size == 1
463  diag = Like get_user and put_user, kdb_getarea and kdb_putarea take variable* names, not pointers. The underlying *_size functions take pointers.(w1, addr)
464  If Not diag Then word = w1
466  Break
467  Case size == 2
468  diag = Like get_user and put_user, kdb_getarea and kdb_putarea take variable* names, not pointers. The underlying *_size functions take pointers.(w2, addr)
469  If Not diag Then word = w2
471  Break
472  Case size == 4
473  diag = Like get_user and put_user, kdb_getarea and kdb_putarea take variable* names, not pointers. The underlying *_size functions take pointers.(w4, addr)
474  If Not diag Then word = w4
476  Break
477  Case size == 8
478  If size <= size of word Then
480  If Not diag Then word = w8
482  Break
485  Default
486  diag = KDB_BADWIDTH
487  kdb_printf("kdb_getword: bad width %ld\n", (long)size)
489  Return diag
Caller
NameDescribe
kdb_md
kdb_per_cpukdb_per_cpu - This function implements the 'per_cpu' command.
kdb_md_linekdb_md - This function implements the 'md', 'md1', 'md2', 'md4',* 'md8' 'mdr' and 'mds' commands.* md|mds [ [ []]]* mdWcN [ [ []]]* where W = is the width (1, 2, 4 or 8) and N is the count.* for eg