Function report |
Source Code:kernel\debug\kdb\kdb_support.c |
Create Date:2022-07-28 11:42:56 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:kdbnearsym - Return the name of the symbol with the nearest address* less than 'addr'
Proto:int kdbnearsym(unsigned long addr, kdb_symtab_t *symtab)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| unsigned long | addr | |
| kdb_symtab_t * | symtab |
| 84 | ret = 0 |
| 85 | symbolsize = 0 |
| 86 | offset = 0 |
| 88 | char * knt1 = NULL |
| 90 | If KDB_DEBUG(AR) Then kdb_printf("kdbnearsym: addr=0x%lx, symtab=%px\n", addr, symtab) |
| 97 | If Not knt1 Then |
| 98 | kdb_printf("kdbnearsym: addr=0x%lx cannot kmalloc knt1\n", addr) |
| 100 | Go to out |
| 104 | If offset > 8 * 1024 * 1024 Then |
| 105 | Full symbol name, including* any version = NULL |
| 106 | addr = offset = symbolsize = 0 |
| 109 | sym_end = sym_start + symbolsize |
| 110 | ret = Full symbol name, including* any version != NULL && *Full symbol name, including* any version != '\0' |
| 112 | If ret Then |
| 121 | If Full symbol name, including* any version != knt1 Then |
| 123 | knt1[must be >= kallsyms table size - 1] = '\0' |
| 126 | If arbitrary size [i] && strcmp(arbitrary size [i], knt1) == 0 Then Break |
| 131 | debug_kfree(arbitrary size [0]) |
| 132 | memmove(arbitrary size , arbitrary size + 1, size of arbitrary size [0] * (ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(arbitrary size ) - 1)) |
| 135 | Else |
| 136 | debug_kfree(knt1) |
| 137 | knt1 = arbitrary size [i] |
| 138 | memmove(arbitrary size + i, arbitrary size + i + 1, size of arbitrary size [0] * (ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(arbitrary size ) - i - 1)) |
| 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 |
| 145 | knt1 = NULL |
| 148 | If (Module containing symbol or* "kernel" == NULL) Then Module containing symbol or* "kernel" = "kernel" |
| 150 | If KDB_DEBUG(AR) Then 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 | Return ret |
| Name | Describe |
|---|---|
| kdb_md_line | kdb_md - This function implements the 'md', 'md1', 'md2', 'md4',* 'md8' 'mdr' and 'mds' commands.* md|mds [ |
| kdb_symbol_print | kdb_symbol_print - Standard method for printing a symbol name and offset |
| kdb_print_nameval | kdb_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 |
| kdbgetaddrarg | kdbgetaddrarg - This function is responsible for parsing an* address-expression and returning the value of the expression,* symbol name, and offset to the caller |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |