]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC 290728:
authorjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 18 Jan 2016 18:27:21 +0000 (18:27 +0000)
committerjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 18 Jan 2016 18:27:21 +0000 (18:27 +0000)
commit441798ef2ed02ff2202b3a404fadedba75a0d641
tree74ba68a5c50bce5ed0eb00cf26bc8f79f267249b
parenteea9fd9b2e1ee80c6b98bc9ce9c186b374c6b14f
MFC 290728:
Export various helper variables describing the layout and size of
certain kernel structures for use by debuggers. This mostly aids
in examining cores from a kernel without debug symbols as a debugger
can infer these values if debug symbols are available.

One set of variables describes the layout of 'struct linker_file' to
walk the list of loaded kernel modules.

A second set of variables describes the layout of 'struct proc' and
'struct thread' to walk the list of processes in the kernel and the
threads in each process.

The 'pcb_size' variable is used to index into the stoppcbs[] array.

The 'vm_maxuser_address' is used to distinguish kernel virtual addresses
from user addresses. This doesn't have to be perfect, and
'vm_maxuser_address' is a cheap and simple way to differentiate kernel
pointers from simple values like TIDs and PIDs.

While here, annotate the fields in struct pcb used by kgdb on amd64
and i386 to note that their ABI should be preserved.  Annotations for
other platforms will be added in the future.

git-svn-id: svn://svn.freebsd.org/base/stable/10@294283 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/amd64/include/pcb.h
sys/i386/include/pcb.h
sys/kern/kern_linker.c
sys/kern/kern_mib.c
sys/kern/kern_proc.c
sys/vm/vm_kern.c