Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:kdb_register_flags

Proto:int kdb_register_flags(char *cmd, kdb_func_t func, char *usage, char *help, short minlen, kdb_cmdflags_t flags)

Type:int

Parameter:

TypeParameterName
char *cmd
kdb_func_tfunc
char *usage
char *help
shortminlen
kdb_cmdflags_tflags
2672  If Command name && strcmp(Command name , cmd) == 0 Then
2673  kdb_printf("Duplicate kdb command registered: %s, func %px help %s\n", cmd, func, help)
2675  Return 1
2683  If (Command name == NULL) Then Break
2687  If i >= kdb_max_commands Then
2688  new = kmalloc_array - allocate memory for an array.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
2693  If Not new Then
2694  kdb_printf("Could not allocate new kdb_command table\n")
2696  Return 1
2703  memset(new + kdb_max_commands - KDB_BASE_CMD_MAX, 0, arbitrary * size of new )
2705  kdb_commands describes the available commands. = new
2706  kp = kdb_commands describes the available commands. + kdb_max_commands - KDB_BASE_CMD_MAX
2707  kdb_max_commands += arbitrary
2710  Command name = cmd
2711  Function to execute command = func
2712  Usage String for this command = usage
2713  Help message for this command = help
2714  Minimum legal # command* chars required = minlen
2715  Command behaviour flags = flags
2717  Return 0
Caller
NameDescribe
kdb_defcmd2
kdb_registerkdb_register - Compatibility register function for commands that do* not need to specify a repeat state
kdb_inittabInitialize the kdb command table.
kdb_initbptabInitialize the breakpoint table and register breakpoint commands.
kdb_ftrace_register