函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\debug\kdb\kdb_support.c Create Date:2022-07-27 12:47:18
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:kdbnearsym - Return the name of the symbol with the nearest address* less than 'addr'

函数原型:int kdbnearsym(unsigned long addr, kdb_symtab_t *symtab)

返回类型:int

参数:

类型参数名称
unsigned longaddr
kdb_symtab_t *symtab
84  ret等于0
85  symbolsize等于0
86  offset等于0
88  char * knt1 = NULL
90  如果KDB_DEBUG(AR)则kdb_printf("kdbnearsym: addr=0x%lx, symtab=%px\n", addr, symtab)
92  memset(symtab, 0, symtab的长度)
94  如果addr小于4096则转到:out
96  knt1等于debug_kmalloc(must be >= kallsyms table size , DOC: Useful GFP flag combinations* Useful GFP flag combinations* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~* Useful GFP flag combinations that are commonly used. It is recommended* that subsystems start with one of these combinations and then set/clear)
97  如果非knt1
98  kdb_printf("kdbnearsym: addr=0x%lx cannot kmalloc knt1\n", addr)
100  转到:out
102  Full symbol name, including* any version 等于Lookup an address* - modname is set to NULL if it's in the kernel.* - We guarantee that the returned name is valid until we reschedule even if.* It resides in a module.* - We also guarantee that modname will be valid until rescheduled.
104  如果offset大于8乘1024乘1024则
105  Full symbol name, including* any version = NULL
106  addr等于offset等于symbolsize等于0
108  sym_start等于addroffset
109  sym_end等于sym_startsymbolsize
110  ret等于Full symbol name, including* any version 不等于NULL且*Full symbol name, including* any version 不等于'\0'
112  如果ret
126  如果arbitrary size [i]且字符串比较恒等于0则退出
135  否则
136  debug_kfree(knt1)
137  knt1等于arbitrary size [i]
142  i等于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(arbitrary size )减1
143  arbitrary size [i]等于knt1
144  Full symbol name, including* any version 等于arbitrary size [i]
145  knt1 = NULL
148  如果(Module containing symbol or* "kernel" == NULL)则Module containing symbol or* "kernel" 等于"kernel"
150  如果KDB_DEBUG(AR)则kdb_printf("kdbnearsym: returns %d symtab->sym_start=0x%lx, symtab->mod_name=%px, symtab->sym_name=%px (%s)\n", ret, sym_start, Module containing symbol or* "kernel" , Full symbol name, including* any version , Full symbol name, including* any version )
156  out :
157  debug_kfree(knt1)
158  返回:ret
调用者
名称描述
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
kdb_symbol_printkdb_symbol_print - Standard method for printing a symbol name and offset
kdb_print_namevalkdb_print_nameval - Print a name and its value, converting the* value to a symbol lookup if possible.* Inputs:* name field name to print* val value of field
kdbgetaddrargkdbgetaddrarg - This function is responsible for parsing an* address-expression and returning the value of the expression,* symbol name, and offset to the caller