summaryrefslogtreecommitdiffstats
path: root/sys/ddb
Commit message (Collapse)AuthorAgeFilesLines
* Part 1 of KSE-IIIjulian2002-06-291-8/+30
| | | | | | | | | | | | | The ability to schedule multiple threads per process (one one cpu) by making ALL system calls optionally asynchronous. to come: ia64 and power-pc patches, patches for gdb, test program (in tools) Reviewed by: Almost everyone who counts (at various times, peter, jhb, matt, alfred, mini, bernd, and a cast of thousands) NOTE: this is still Beta code, and contains lots of debugging stuff. expect slight instability in signals..
* Remove a couple of __P() stragglers.peter2002-06-291-1/+1
|
* Don't assume that pointers are 4 bytes or sizeof(int) in size. This fixestmm2002-06-252-6/+3
| | | | | | the indirection operator ('*') and address examination ('x/a') on big-endian platoforms for which the above is not true, as well as on little-endian platforms if the cut-off bits are not 0.
* Split the declaration and the initialization of two variables.mux2002-06-231-4/+4
| | | | | | | This has the fortunate side effect of stopping GCC from reporting warnings about unused variables on sparc64. Reviewed by: bde
* Allow DB_SET() to set all fields in the ddb command structure. Thisgibbs2002-06-051-5/+5
| | | | | allows external ddb commands to do anyting an internal command can do, including non-standard argument parsing if desired.
* Reconnect db_elf.c to the build (now under "options DDB_NOKLDSYM"). Itbde2002-05-072-2/+12
| | | | doesn't actually build yet.
* Restored db_elf.c from the Attic. This will be used for a quick fix forbde2002-05-061-0/+381
| | | | | the longstanding brokenness of symbols in ddb at boot time. It doesn't compile and is not attached to the build yet.
* Commented out locking that would be used in the ps command if locks werejhb2002-04-111-0/+5
| | | | used in ddb.
* Fixed some style bugs in the removal of __P(()). Continuation linesbde2002-03-233-23/+15
| | | | | were not outdented to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting.
* Remove __P.alfred2002-03-2019-113/+108
|
* Allow '.' in identifiers - some ia64 register names contain '.'.dfr2002-03-101-1/+1
|
* ^U kills an entire input line in most applications,yar2002-02-121-5/+6
| | | | | | | including the default terminal canonical mode. So let ddb(4) be no exception from this rule. Pointed out by: Mark Peek <mark@peek.org>
* Teach ddb(4) to delete to the beginning of its command line on ^U.yar2002-02-111-0/+5
| | | | | PR: kern/28976 Submitted by: Nickolai Zeldovich <kolya@orbit.zepa.net>
* Pre-KSE/M3 commit.julian2002-02-071-1/+1
| | | | | | | | | | this is a low-functionality change that changes the kernel to access the main thread of a process via the linked list of threads rather than assuming that it is embedded in the process. It IS still embeded there but remove all teh code that assumes that in preparation for the next commit which will actually move it out. Reviewed by: peter@freebsd.org, gallatin@cs.duke.edu, benno rice,
* pid is 'long' on alpha.mjacob2002-01-171-2/+2
|
* Implement a "kill" DDB command which is an interface to psignal() thatdd2001-11-271-0/+59
| | | | | | | | | | | | | | | respects locks. Before SMPng, one was able to call psignal() using the "call" command, but this is no longer possible because it does not respect locks by itself. This is very useful when one has gotten their machine into a state where it is impossible to spawn ps/kill or su to root. In this case, respecting locks essentially means trying to aquire the proc lock before calling psignal(). We can't block in the debugger, so if trylock fails, the operation fails. This also means that we can't use pfind(), since that will attempt to lock the process for us. Reviewed by: jhb
* GC the a.out support in DDB, nothing anywhere would pull thisphk2001-11-051-402/+0
| | | | file into a build.
* - Include machine/md_var.h to get rid of cpu_reset() warning. (-Wall)arr2001-11-051-0/+1
| | | | Approved by: jhb
* Add a 'reset' command. This is useful for panics really early beforepeter2001-11-031-0/+13
| | | | any symbols are loaded. Especially for unattended machines.
* Make the flag field in the ps output one char wider to account for recentjhb2001-10-201-6/+13
| | | | | growth in the number of flags used. Also, if a thread is blocked on a mutex, print the mutex name in the wait channel column.
* Fill out some gaps in ia64 DDB support. This involves generalising DDB'sdfr2001-09-153-25/+36
| | | | | breakpoint handling slightly to cope with the fact that ia64 instructions are not located on byte boundaries.
* - Whitespace fixes.jhb2001-09-121-16/+9
| | | | - Fix an old bug: p_comm is an array not a pointer, so it can't be NULL.`
* KSE Milestone 2julian2001-09-121-8/+30
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* No tokens should follow #endif.obrien2001-08-151-2/+2
|
* Quiet a variable format-string warning.kris2001-07-191-1/+1
| | | | MFC after: 1 week
* Add 'hwatch' and 'dhwatch' ddb commands analogous to 'watch' andbsd2001-07-113-0/+49
| | | | | | | | | | 'dwatch'. The new commands install hardware watchpoints if supported by the architecture and if there are enough registers to cover the desired memory area. No objection by: audit@, hackers@ MFC after: 2 weeks
* A set of changes to reduce the number of include files the kerneljulian2001-07-082-2/+3
| | | | | | takes from /usr/include. I cannot check them on alpha.. (will try beast) Briefly looked at by: Warner Losh <imp@harmony.village.org>
* With this commit, I hereby pronounce gensetdefs past its use-by date.peter2001-06-131-14/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the a.out emulation of 'struct linker_set' with something a little more flexible. <sys/linker_set.h> now provides macros for accessing elements and completely hides the implementation. The linker_set.h macros have been on the back burner in various forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()), John Polstra (ELF clue) and myself (cleaned up API and the conversion of the rest of the kernel to use it). The macros declare a strongly typed set. They return elements with the type that you declare the set with, rather than a generic void *. For ELF, we use the magic ld symbols (__start_<setname> and __stop_<setname>). Thanks to Richard Henderson <rth@redhat.com> for the trick about how to force ld to provide them for kld's. For a.out, we use the old linker_set struct. NOTE: the item lists are no longer null terminated. This is why the code impact is high in certain areas. The runtime linker has a new method to find the linker set boundaries depending on which backend format is in use. linker sets are still module/kld unfriendly and should never be used for anything that may be modular one day. Reviewed by: eivind
* o Merge contents of struct pcred into struct ucred. Specifically, add therwatson2001-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | real uid, saved uid, real gid, and saved gid to ucred, as well as the pcred->pc_uidinfo, which was associated with the real uid, only rename it to cr_ruidinfo so as not to conflict with cr_uidinfo, which corresponds to the effective uid. o Remove p_cred from struct proc; add p_ucred to struct proc, replacing original macro that pointed. p->p_ucred to p->p_cred->pc_ucred. o Universally update code so that it makes use of ucred instead of pcred, p->p_ucred instead of p->p_pcred, cr_ruidinfo instead of p_uidinfo, cr_{r,sv}{u,g}id instead of p_*, etc. o Remove pcred0 and its initialization from init_main.c; initialize cr_ruidinfo there. o Restruction many credential modification chunks to always crdup while we figure out locking and optimizations; generally speaking, this means moving to a structure like this: newcred = crdup(oldcred); ... p->p_ucred = newcred; crfree(oldcred); It's not race-free, but better than nothing. There are also races in sys_process.c, all inter-process authorization, fork, exec, and exit. o Remove sigio->sio_ruid since sigio->sio_ucred now contains the ruid; remove comments indicating that the old arrangement was a problem. o Restructure exec1() a little to use newcred/oldcred arrangement, and use improved uid management primitives. o Clean up exit1() so as to do less work in credential cleanup due to pcred removal. o Clean up fork1() so as to do less work in credential cleanup and allocation. o Clean up ktrcanset() to take into account changes, and move to using suser_xxx() instead of performing a direct uid==0 comparision. o Improve commenting in various kern_prot.c credential modification calls to better document current behavior. In a couple of places, current behavior is a little questionable and we need to check POSIX.1 to make sure it's "right". More commenting work still remains to be done. o Update credential management calls, such as crfree(), to take into account new ruidinfo reference. o Modify or add the following uid and gid helper routines: change_euid() change_egid() change_ruid() change_rgid() change_svuid() change_svgid() In each case, the call now acts on a credential not a process, and as such no longer requires more complicated process locking/etc. They now assume the caller will do any necessary allocation of an exclusive credential reference. Each is commented to document its reference requirements. o CANSIGIO() is simplified to require only credentials, not processes and pcreds. o Remove lots of (p_pcred==NULL) checks. o Add an XXX to authorization code in nfs_lock.c, since it's questionable, and needs to be considered carefully. o Simplify posix4 authorization code to require only credentials, not processes and pcreds. Note that this authorization, as well as CANSIGIO(), needs to be updated to use the p_cansignal() and p_cansched() centralized authorization routines, as they currently do not take into account some desirable restrictions that are handled by the centralized routines, as well as being inconsistent with other similar authorization instances. o Update libkvm to take these changes into account. Obtained from: TrustedBSD Project Reviewed by: green, bde, jhb, freebsd-arch, freebsd-audit
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inmarkm2001-05-011-1/+2
| | | | | | | | | | | other "system" header files. Also help the deprecation of lockmgr.h by making it a sub-include of sys/lock.h and removing sys/lockmgr.h form kernel .c files. Sort sys/*.h includes where possible in affected files. OK'ed by: bde (with reservations)
* Catch up to header include changes:jhb2001-03-281-0/+2
| | | | | - <sys/mutex.h> now requires <sys/systm.h> - <sys/mutex.h> and <sys/sx.h> now require <sys/lock.h>
* Use macro API for <sys/queue.h>phk2000-12-301-4/+4
|
* Previous commit changing SYSCTL_HANDLER_ARGS violated KNF.phk2000-07-041-1/+1
| | | | Pointed out by: bde
* Style police catches up with rev 1.26 of src/sys/sys/sysctl.h:phk2000-07-031-1/+1
| | | | | | | | Sanitize SYSCTL_HANDLER_ARGS so that simplistic tools can grog our sources: -sysctl_vm_zone SYSCTL_HANDLER_ARGS +sysctl_vm_zone (SYSCTL_HANDLER_ARGS)
* Add a new sysctl "debug.enter_debugger" (when the kernel is compiledarchie2000-01-271-0/+77
| | | | | | | | | with 'options DDB'). Setting this to `ddb' or `gdb' breaks into the kernel debugger in the corresponding mode. This mechanism has proven very useful at Whistle for setting breakpoints, etc., while doing remote serial line kernel debugging. Obtained from: Whistle source tree
* Add a new mechanism, cndbctl(), to tell the console driver thatyokota2000-01-112-8/+2
| | | | | | | | | | | | | | | | | | | | | ddb is entered. Don't refer to `in_Debugger' to see if we are in the debugger. (The variable used to be static in Debugger() and wasn't updated if ddb is entered via traps and panic anyway.) - Don't refer to `in_Debugger'. - Add `db_active' to i386/i386/db_interface.d (as in alpha/alpha/db_interface.c). - Remove cnpollc() stub from ddb/db_input.c. - Add the dbctl function to syscons, pcvt, and sio. (The function for pcvt and sio is noop at the moment.) Jointly developed by: bde and me (The final version was tweaked by me and not reviewed by bde. Thus, if there is any error in this commit, that is entirely of mine, not his.) Some changes were obtained from: NetBSD
* Unused file. This (NetBSD derived) file was obsoleted by kld.peter2000-01-111-381/+0
|
* Fix a typo in the db_kld.c file - it's kld support not raw a.out support.peter2000-01-111-4/+1
| | | | | Always use db_kld.c for symbol table support as the base kernel maintains this information.
* Remove unused macro definition.archie1999-11-021-1/+0
|
* useracc() the prequel:phk1999-10-291-1/+0
| | | | | | | | | | | Merge the contents (less some trivial bordering the silly comments) of <vm/vm_prot.h> and <vm/vm_inherit.h> into <vm/vm.h>. This puts the #defines for the vm_inherit_t and vm_prot_t types next to their typedefs. This paves the road for the commit to follow shortly: change useracc() to use VM_PROT_{READ|WRITE} rather than B_{READ|WRITE} as argument.
* Delete unneeded #includepeter1999-10-111-2/+0
| | | | Submitted by: phk
* $Id$ -> $FreeBSD$peter1999-08-2828-28/+28
|
* Merge the cons.c and cons.h to the best of my ability. alpha may orphk1999-08-094-11/+8
| | | | may not compile, I can't test it.
* The following patch will remove a hack introduced inyokota1999-07-141-13/+1
| | | | | | | /sys/ddb/db_input.c rev 1.19 to recognize syscons's cursor keycodes. It is unnecessary now that scgetc() in syscons returns the escape sequence for the cursor keys rather than their raw, internal key codes.
* Quiet warnings on Alpha. (db_expr_t is a long on alpha, int on x86)peter1999-07-017-27/+26
|
* Removed an especially bogus cast.bde1999-05-131-2/+2
|
* Restored used include of <sys/systm.h>. -Wmissing-prototypes doesn't workbde1999-05-132-2/+5
| | | | for builtin functions.
* add some amount of sanity to the way the gdb stuff finds its device.phk1999-05-092-4/+18
| | | | | | | | I'm not too happy about the result either, but at least it has less chance of backfiring. This particular feature could be called "a mess" without offending anybody.
* Get rid of extern declarations on gdb stuff so systems compiled withoutmckusick1999-05-071-1/+9
| | | | | DDB will compile. Warn users that try to use GDB without specifying a GDB port in their configuration file.
* Fixed -Wcast-qual warnings.bde1999-02-123-9/+9
|
OpenPOWER on IntegriCloud