ddb: Print the thread's pcb in 'show thread'

This can aid with debugging when a thread is running and has no backtrace.
State can be estimated based on the pcb, and refined from there, for
example, to get a rough idea of the stack pointer.
This commit is contained in:
Justin Hibbits 2019-02-09 21:08:19 +00:00
parent 5515886768
commit 517ba0d3f1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=343943

View File

@ -352,6 +352,7 @@ DB_SHOW_COMMAND(thread, db_show_thread)
db_printf(" proc (pid %d): %p\n", td->td_proc->p_pid, td->td_proc);
if (td->td_name[0] != '\0')
db_printf(" name: %s\n", td->td_name);
db_printf(" pcb: %p\n", td->td_pcb);
db_printf(" stack: %p-%p\n", (void *)td->td_kstack,
(void *)(td->td_kstack + td->td_kstack_pages * PAGE_SIZE - 1));
db_printf(" flags: %#x ", td->td_flags);