Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Feb 2019 21:08:19 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r343943 - head/sys/ddb
Message-ID:  <201902092108.x19L8JeS086091@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Sat Feb  9 21:08:19 2019
New Revision: 343943
URL: https://svnweb.freebsd.org/changeset/base/343943

Log:
  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.

Modified:
  head/sys/ddb/db_ps.c

Modified: head/sys/ddb/db_ps.c
==============================================================================
--- head/sys/ddb/db_ps.c	Sat Feb  9 16:53:39 2019	(r343942)
+++ head/sys/ddb/db_ps.c	Sat Feb  9 21:08:19 2019	(r343943)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902092108.x19L8JeS086091>