成功启动crash
会话后,会有一个task
被指定为current context
。因为有一些命令是context-sensitive
,也即这些命令的运行会依赖于current context
,所以知道当前的current context
就很重要。
选择current context
的标准:
a)coredump
文件:
The task that was running when die() was called.
The task that was running when panic() was called.
The task that was running when an ALT-SYSRQ-c keyboard interrupt was received.
The task that was running when the character "c" was echoed to /proc/sysrq-trigger.
b)当前运行的系统:
`crash`命令本身.
执行set
命令显示当前current context
:
crash> set
PID: 2366
COMMAND: "crash"
TASK: ffff88001ae60000 [THREAD_INFO: ffff88001c1f0000]
CPU: 0
STATE: TASK_RUNNING (ACTIVE)
也可利用set
命令改变当前current context
:
crash> set 1
PID: 1
COMMAND: "systemd"
TASK: ffff88001dfd8000 [THREAD_INFO: ffff88001dfe0000]
CPU: 0
STATE: TASK_INTERRUPTIBLE