summaryrefslogtreecommitdiffstats
path: root/sys/kern/vnode_if.src
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-04-25 20:22:48 +0000
committerjhb <jhb@FreeBSD.org>2006-04-25 20:22:48 +0000
commit819f9866cd1dc759418685f6f6b7a0743dd17df7 (patch)
tree5fe039d6c6b0a45e1f891fbf1c32071b18e1ca50 /sys/kern/vnode_if.src
parent3ccc5435bf4adaeff66cedce39fddd4ea027fbc8 (diff)
downloadFreeBSD-src-819f9866cd1dc759418685f6f6b7a0743dd17df7.zip
FreeBSD-src-819f9866cd1dc759418685f6f6b7a0743dd17df7.tar.gz
Add two helper functions: db_lookup_thread() and db_lookup_proc(). They
take the addr value passed to a ddb command and attempt to use it to lookup a struct thread * or struct proc *, respectively. Each function first reparses the passed in value as if it was an ID entered in base 10. For threads the ID is treated as a thread ID, for proceses the ID is treated as a PID. If a thread or proc matching the ID is found, it is returned. For db_lookup_thread(), if the check_pid argument is true and it didn't find a thread with a matching thread ID, it will treat the ID as a PID and look for a matching process. If it finds one it returns the first thread in the process. If none of the ID lookups succeeded, then the functions assume that the passed in address is a thread or proc pointer, respectively. This allows one to use tids, pids, or structure pointers interchangeably in ddb functions that want to lookup threads or processes if desired.
Diffstat (limited to 'sys/kern/vnode_if.src')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud