Commit Graph

104973 Commits

Author SHA1 Message Date
pjd
9b7cadd593 Remove unused macro. 2004-07-13 12:01:29 +00:00
pjd
8d2fee9da1 Decrease log level of one debug message, so there is no hole (level 2
wasn't used at all).
2004-07-13 12:01:11 +00:00
pjd
51c2dcdfa6 Document sysctls variables used by GEOM_STRIPE class.
Submitted by:	simon
2004-07-13 11:28:40 +00:00
pjd
c684a2d6ed Minor sysctl description fixes.
Submitted by:	simon
2004-07-13 11:23:31 +00:00
phk
14378802af Another LINT compilation fix 2004-07-13 09:47:27 +00:00
phk
d36b28659f Make LINT compile 2004-07-13 09:46:46 +00:00
simokawa
0f9bf45316 Re-enable debugger port. 2004-07-13 09:41:45 +00:00
simokawa
92e21a3177 Replace DDB with KDB. 2004-07-13 09:37:49 +00:00
davidxu
ebd76e5ca4 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
davidxu
0fdc2233a0 Implement following commands: PT_CLEARSTEP, PT_SETSTEP, PT_SUSPEND
PT_RESUME, PT_GETNUMLWPS, PT_GETLWPLIST.
2004-07-13 07:25:24 +00:00
davidxu
0a29616acf Add ptrace_clear_single_step(), alpha already has it for years, the function
will be used by ptrace to clear a thread's single step state.
2004-07-13 07:22:56 +00:00
davidxu
1920ad199e 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:20:10 +00:00
alfred
51b3793545 Do not call sorecieve() in the context of a socket callback as it causes
lock order reversals so->inpcb since we're called with the socket lock
held.
2004-07-13 07:05:38 +00:00
alc
ea85f85ed9 Simplify pmap_protect(). 2004-07-13 06:54:23 +00:00
alfred
b4f778e20c Turn off SO_REUSEADDR and SO_REUSEPORT, they were causing EADDRINUSE
to be returned from the protocol stack.

Pointy hat to me for not groking what those options _really_ mean.
2004-07-13 05:42:59 +00:00
tjr
8c66633468 Overhaul lputs() to deal with multibyte characters, characters that take
up more than one column position, and null bytes.
2004-07-13 04:35:43 +00:00
alc
ea94acfaa6 Push down the acquisition and release of the page queues lock into
pmap_remove_pages().  (The implementation of pmap_remove_pages() is
optional.  If pmap_remove_pages() is unimplemented, the acquisition and
release of the page queues lock is unnecessary.)

Remove spl calls from the alpha, arm, and ia64 pmap_remove_pages().
2004-07-13 02:49:22 +00:00
imp
d35148311b Set fdc_dev in attach 2004-07-13 02:44:40 +00:00
imp
02b4d8a438 Don't depend on implicit include of machine/bus.h in sys/rman.h, but instead
explicitly include it.
2004-07-13 02:42:23 +00:00
imp
420555b333 pccard no longer requires a count because the floppy driver that
nominally had a non-working reference to card.h has been removed.
2004-07-13 02:37:40 +00:00
tjr
056d1c10d2 Add support for multibyte characters. 2004-07-13 02:18:21 +00:00
imp
bdcd057a4e Remove even more references to generating usbdevs_data.h, et al.
Noticed by: njl
2004-07-12 23:11:09 +00:00
imp
3c84bfe26f Remove the instructions for regenerating usbdevs.h: that's now no
longer necessary.
2004-07-12 22:57:06 +00:00
grehan
60a55c7a06 Rename low-level code ddb -> db. Use KDB instead of DDB.
Fix bug in setup of stack frame where 8 bytes wasn't being
saved for the callee's frame pointer and saved LR.
2004-07-12 22:32:08 +00:00
grehan
94e8bc7955 Bring into KDB new order. 2004-07-12 22:26:20 +00:00
grehan
f05f1634a3 - DDB -> KDB, with kdb routines
- ddb -> db for low-level trapcode
- implement makectx. I think it only matters that the stack is setup
  correctly.
- bring over ddb_trap_glue and rename to db_trap_glue
2004-07-12 22:25:09 +00:00
grehan
a33f31931d No need for ddb option. Never a need for ipkdb option. 2004-07-12 22:22:53 +00:00
grehan
4505b37f92 Catch up with gratuitous ddb -> db renaming 2004-07-12 22:22:09 +00:00
grehan
7ab8fbe2ac Bring into line with KDB. Bring in NetBSD updates for backtrace routine,
although it really needs a decent re-work.
2004-07-12 22:21:34 +00:00
grehan
2312a73897 Remove unused NetBSD code. Bring mem r/w routines into here in line
with sparc64, although keep the size deref checks: they are useful
when accessing PCI space where some devices may not implement byte
access.
2004-07-12 22:20:01 +00:00
grehan
a73dd12638 Gratuitous namechange to avoid low-level association with ddb. 2004-07-12 22:18:02 +00:00
grehan
9006058072 Add prototype for KDB's makectx routine 2004-07-12 22:17:20 +00:00
grehan
e272511bfa Remove old NetBSD-derived unused code and stuff that is now obsolete
due to KDB.
2004-07-12 22:16:50 +00:00
grehan
a9b5e762ae DDB -> KDB, and rename low-level trap handler to avoid name conflict. 2004-07-12 22:16:04 +00:00
grehan
e0f0e7381e kdb.h for PowerPC. Stubs for now. 2004-07-12 22:15:03 +00:00
grehan
a0724f3f5a Add new KDB option, and also drop in long-held fxp/dc eth drivers. 2004-07-12 22:14:21 +00:00
grehan
8d3be5dece db_memrw.c has been subsumed into db_interface.c ala sparc64 2004-07-12 22:13:27 +00:00
imp
72524b7544 Remove stray line with just a tab
Remove usbdevs_data.h, it isn't used by the module

Noticed by: Pawel Worach
2004-07-12 21:59:06 +00:00
dwmalone
6ff1185c1d Rename Alfred's kern_setsockopt to so_setsockopt, as this seems a
a better name. I have a kern_[sg]etsockopt which I plan to commit
shortly, but the arguments to these function will be quite different
from so_setsockopt.

Approved by:	alfred
2004-07-12 21:42:33 +00:00
cognet
1176e2e3a5 Update to kdb. 2004-07-12 21:25:01 +00:00
cognet
7563f4f40c Remove the kbd_trap() declaration. 2004-07-12 21:24:21 +00:00
cognet
a5d0266aaa Protect setjmp.h with #ifndef _MACHINE_SETJMP_H_. 2004-07-12 21:23:58 +00:00
cognet
3884d9a863 Forward declare "struct pcb", so that one does not need to include
<machine/pcb.h> before including <machine/pmap.h>.
2004-07-12 21:22:40 +00:00
cognet
b0940860cf Implement a stub breakpoint(). 2004-07-12 21:20:38 +00:00
cognet
5c9c269caa Implement makectx(). 2004-07-12 21:19:43 +00:00
cognet
017c5d391c Prototype makectx(). 2004-07-12 21:19:22 +00:00
cognet
668e7d838d Import bus_memio.h and bus_pio.h for arm. 2004-07-12 21:18:30 +00:00
cognet
5eba49c6e6 Import a kdb.h for arm, which contains stubs right now. 2004-07-12 21:17:51 +00:00
njl
7c75fe7d97 Remove unnecessary softc bzero calls. 2004-07-12 21:15:36 +00:00
njl
462b2a5e44 Add the ability to detach a battery. Now batteries that are detached are
also removed from the battery list.
2004-07-12 20:53:04 +00:00