freebsd with flexible iflib nic queues
Go to file
David Xu 4d47dc5549 Add code to support debugging threaded process.
1. Add tm_lwpid into kse_thr_mailbox to indicate which kernel
     thread current user thread is running on. Add tm_dflags into
     kse_thr_mailbox, the flags is written by debugger, it tells
     UTS and kernel what should be done when the process is being
     debugged, current, there two flags TMDF_SSTEP and TMDF_DONOTRUNUSER.

     TMDF_SSTEP is used to tell kernel to turn on single stepping,
     or turn off if it is not set.

     TMDF_DONOTRUNUSER is used to tell kernel to schedule upcall
     whenever possible, to UTS, it means do not run the user thread
     until debugger clears it, this behaviour is necessary because
     gdb wants to resume only one thread when the thread's pc is
     at a breakpoint, and thread needs to go forward, in order to
     avoid other threads sneak pass the breakpoints, it needs to remove
     breakpoint, only wants one thread to go. Also, add km_lwp to
     kse_mailbox, the lwp id is copied to kse_thr_mailbox at context
     switch time when process is not being debugged, so when process
     is attached, debugger can map kernel thread to user thread.

  2. Add p_xthread to proc strcuture and td_xsig to thread structure.
     p_xthread is used by a thread when it wants to report event
     to debugger, every thread can set the pointer, especially, when
     it is used in ptracestop, it is the last thread reporting event
     will win the race. Every thread has a td_xsig to exchange signal
     with debugger, thread uses TDF_XSIG flag to indicate it is reporting
     signal to debugger, if the flag is not cleared, thread will keep
     retrying until it is cleared by debugger, p_xthread may be
     used by debugger to indicate CURRENT thread. The p_xstat is still
     in proc structure to keep wait() to work, in future, we may
     just use td_xsig.

  3. Add TDF_DBSUSPEND flag, the flag is used by debugger to suspend
     a thread. When process stops, debugger can set the flag for
     thread, thread will check the flag in thread_suspend_check,
     enters a loop, unless it is cleared by debugger, process is
     detached or process is existing. The flag is also checked in
     ptracestop, so debugger can temporarily suspend a thread even
     if the thread wants to exchange signal.

  4. Current, in ptrace, we always resume all threads, but if a thread
     has already a TDF_DBSUSPEND flag set by debugger, it won't run.

Encouraged by: marcel, julian, deischen
2004-07-13 07:33:40 +00:00
bin Remove BUGS section that talked about missing multibyte character support. 2004-07-12 10:46:55 +00:00
contrib document the 'I' and 't' commands in the help screen in top(1). 2004-07-12 15:22:44 +00:00
crypto Regenerate. 2004-04-20 09:49:37 +00:00
etc Whitespace cleanup. This will simplify a future merge from 2004-07-11 19:20:47 +00:00
games Resolve a couple of warnings and bump WARNS to 6. 2004-07-11 17:26:18 +00:00
gnu MAJOR cleanup of the Bmake framework. 2004-07-08 17:05:34 +00:00
include Add a new error code, REG_ILLSEQ, to indicate that a regular expression 2004-07-12 06:07:26 +00:00
kerberos5 Update version strings for Heimdal: 0.6 -> 0.6.1 2004-04-13 16:41:00 +00:00
lib Remove an entry from the BUGS section: we have multibyte character 2004-07-12 11:03:42 +00:00
libexec Fix a few cases that relied on 'implicit int' (constraint violation in C99). 2004-07-11 17:37:33 +00:00
release Add p5-File-Spec and p5-File-Temp. 2004-07-12 10:12:51 +00:00
rescue Remove dangling raidctl reference 2004-03-16 13:42:23 +00:00
sbin Decrease default stripe size to 4k, as we have "FAST" mode turned on by 2004-07-09 14:41:51 +00:00
secure Import the openssl conf for arm. 2004-05-14 12:26:51 +00:00
share Document thread parameter passed to VFS_ROOT and vflush. 2004-07-12 09:06:51 +00:00
sys Add code to support debugging threaded process. 2004-07-13 07:33:40 +00:00
tools Experimental support for using doxygen to generate kernel documentation. 2004-07-11 16:13:57 +00:00
usr.bin Overhaul lputs() to deal with multibyte characters, characters that take 2004-07-13 04:35:43 +00:00
usr.sbin Fix a few cases that relied on 'implicit int' (constraint violation in C99). 2004-07-11 17:37:33 +00:00
COPYRIGHT
installworld_newk
installworld_oldk
MAINTAINERS Introduce GEOM_LABEL class. 2004-07-02 19:40:36 +00:00
Makefile Add a JFLAG which can be used to speed up universe: 2004-07-09 13:55:50 +00:00
Makefile.inc1 Get rid of the THISHOST variable when building on sparc64. The problem 2004-07-08 09:08:09 +00:00
README
UPDATING Fix typo in 20040702 entry. 2004-07-11 13:26:44 +00:00
UPDATING.64BTT Add a tip for people who are using database-related ports on a sparc64 2004-03-17 01:59:47 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The
``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html