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:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:kdb_ps - This function implements the 'ps' command which shows a* list of the active processes.* ps [DRSTCZEUIMA] All processes, optionally filtered by state

Proto:void kdb_ps1(const struct task_struct *p)

Type:void

Parameter:

TypeParameterName
const struct task_struct *p
2325  If Not p || probe_kernel_read(): safely attempt to read from a location*@dst: pointer to the buffer that shall take the data*@src: address to read from*@size: size of the data chunk* Safely read from address @src to the buffer at @dst. If a kernel fault Then Return
2328  cpu = kdb_process_cpu(p)
2329  kdb_printf("0x%px %8d %8d %d %4d %c 0x%px %c%s\n", (void * )p, process id, process id, kdb_task_has_cpu(p), kdb_process_cpu(p), kdb_task_state_char - Return the character that represents the task state.* Inputs:* p struct task for the process* Returns:* One character to represent the task state., (void * )( & * New fields for task_struct should be added above here, so that * they are included in the randomized portion of task_struct.), p == kdb_curr_task(These macros fold the SMP functionality into a single CPU system()) ? '*' : ' ', * executable name, excluding path. * - normally initialized setup_new_exec() * - access it with [gs]et_task_comm() * - lock it with task_lock())
2336  If kdb_task_has_cpu(p) Then
2337  If Not KDB_TSK(cpu) Then
2338  kdb_printf(" Error: no saved data for this cpu\n")
2339  Else
2340  If KDB_TSK(cpu) != p Then kdb_printf(" Error: does not match running process table (0x%px)\n", KDB_TSK(cpu))
Caller
NameDescribe
kdb_ps
kdb_bt1kdb_bt* This function implements the 'bt' command