MFC r284167:
Merge r283870 from amd64: Remove unneeded NULL checks in trap_fatal(). Since td_name is an array member of struct thread, it can never be NULL, so the check can be removed. In addition, curproc can never be NULL, so remove the if statement, and splice the two printfs() together. While here, remove the u_long cast, and use the correct printf format specifier for curproc->p_pid. Requested by: jhb
This commit is contained in:
parent
094ec02dc8
commit
f96f7b3d8f
@ -1001,12 +1001,8 @@ trap_fatal(frame, eva)
|
||||
if (frame->tf_eflags & PSL_VM)
|
||||
printf("vm86, ");
|
||||
printf("IOPL = %d\n", (frame->tf_eflags & PSL_IOPL) >> 12);
|
||||
printf("current process = ");
|
||||
if (curproc) {
|
||||
printf("%lu (%s)\n", (u_long)curproc->p_pid, curthread->td_name);
|
||||
} else {
|
||||
printf("Idle\n");
|
||||
}
|
||||
printf("current process = %d (%s)\n",
|
||||
curproc->p_pid, curthread->td_name);
|
||||
|
||||
#ifdef KDB
|
||||
if (debugger_on_panic || kdb_active) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user