Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Look up a kernel symbol and return it in a text buffer.

Proto:static int __sprint_symbol(char *buffer, unsigned long address, int symbol_offset, int add_offset)

Type:int

Parameter:

TypeParameterName
char *buffer
unsigned longaddress
intsymbol_offset
intadd_offset
363  address += symbol_offset
364  name = 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.
365  If Not name Then Return sprintf(buffer, "0x%lx", address - symbol_offset)
368  If name != buffer Then strcpy(buffer, name)
370  len = strlen - Find the length of a string*@s: The string to be sized
371  offset -= symbol_offset
373  If add_offset Then len += sprintf(buffer + len, "+%#lx/%#lx", offset, size)
376  If modname Then len += sprintf(buffer + len, " [%s]", modname)
379  Return len
Caller
NameDescribe
sprint_symbolsprint_symbol - Look up a kernel symbol and return it in a text buffer*@buffer: buffer to be stored*@address: address to lookup* This function looks up a kernel symbol with @address and stores its name,* offset, size and module name to @buffer if possible
sprint_symbol_no_offsetsprint_symbol_no_offset - Look up a kernel symbol and return it in a text buffer*@buffer: buffer to be stored*@address: address to lookup* This function looks up a kernel symbol with @address and stores its name* and module name to @buffer if possible
sprint_backtracesprint_backtrace - Look up a backtrace symbol and return it in a text buffer*@buffer: buffer to be stored*@address: address to lookup* This function is for stack backtrace and does the same thing as* sprint_symbol() but with modified/decreased @address