summaryrefslogtreecommitdiffstats
path: root/sys/ddb/db_input.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r272958, r273006:pfg2014-10-181-1/+1
| | | | | | ddb: space/tab fixes and ANSI-fy function declarations. No functional change.
* Use strchr() and strrchr().ed2012-01-021-1/+1
| | | | | | | | It seems strchr() and strrchr() are used more often than index() and rindex(). Therefore, simply migrate all kernel code to use it. For the XFS code, remove an empty line to make the code identical to the code in the Linux kernel.
* Reserve two bytes at the end of the DDB input line in db_readline() torwatson2008-03-071-1/+4
| | | | | | | | | | hold the newline and nul terminator. Otherwise, there are cases where garbage may end up in the command history due to a lack of a nul terminator, or input may end up without room for a newline. MFC after: 3 days PR: 119079 Submitted by: Michael Plass <mfp49_freebsd@plass-family.net>
* When redrawing an input line, count backspaces to get to the beginning ofrwatson2008-03-061-1/+1
| | | | | | | | | | | the input field from the current cursor location, rather than the end of the input line, as the cursor may not be at the end of the line. Otherwise, we may overshoot, overwriting a bit of the previous line and failing to fully overwrite the current line. MFC after: 3 days PR: 119079 Submitted by: Michael Plass <mfp49_freebsd@plass-family.net>
* Add a new DDB(4) facility, output capture. Input and output from DDB may berwatson2007-12-251-0/+1
| | | | | | | | | | | | | captured to a memory buffer for later inspection using sysctl(8), or in the future, to a textdump. A new DDB command, "capture", is added, which accepts arguments "on", "off", "reset", and "status". A new DDB sysctl tree, debug.ddb.capture, is added, which can be used to resize the capture buffer and extract buffer contents. MFC after: 3 months
* Start each of the license/copyright comments with /*-imp2005-01-061-1/+1
|
* Use __FBSDID().obrien2003-06-101-3/+3
|
* Add /* FALLTHROUGH */phk2003-05-311-0/+1
| | | | Found by: FlexeLint
* The kernel bcopy() is safe for overlapping regions (and always has), sodes2003-04-041-2/+2
| | | | there is no use for a separate ovbcopy().
* Be consistent about "static" functions: if the function is markedphk2002-09-281-5/+5
| | | | | | static in its prototype, mark it static at the definition too. Inspired by: FlexeLint warning #512
* Remove __P.alfred2002-03-201-5/+5
|
* ^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>
* Add a new mechanism, cndbctl(), to tell the console driver thatyokota2000-01-111-7/+0
| | | | | | | | | | | | | | | | | | | | | 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
* Remove unused macro definition.archie1999-11-021-1/+0
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Merge the cons.c and cons.h to the best of my ability. alpha may orphk1999-08-091-3/+2
| | | | 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.
* Some fixes from John Hood:dyson1997-12-051-2/+1
| | | | | | | | 1) Fix the initialization of malloc structure that changed due to perf opt. 2) Remove unneeded include. 3) An initialization assert added to malloc. Submitted by: John Hood <cgull@smoke.marlboro.vt.us>
* Cleaned up revs.1.19-1.21:bde1997-11-201-17/+14
|
* A better fix for the ddb command history buffer problem; use a staticmsmith1997-11-091-9/+9
| | | | | buffer instead of trying to use malloc() in the input routine. Submitted by: john hood <cgull@smoke.marlboro.vt.us>
* Don't try to do anything with the input history if MALLOC() for the buffermsmith1997-11-071-2/+2
| | | | | | failed. This broke early debugging.
* Minor hack to also allow for syscons's "interesting" arrow keys.joerg1997-08-171-1/+13
| | | | | I'm using "#if __i386__ && __FreeBSD__" to check for a ``potentially syscons-relevant environment''. Hope that's ok...
* Everyone's favorite, i think: make DDB understand the arrow keys for thejoerg1997-04-121-1/+38
| | | | | basic cursor movements. Assumes ANSI/DEC tty, but you can still resort to plain emacs ^p/^n etc anyway.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* if there is no console, cngetc should act like getc and return -1julian1996-10-301-1/+8
| | | | make callers aware of this in those cases where it can occur.
* Finally implement a simple commandline history in DDB.joerg1996-08-101-2/+71
| | | | | | | | Emacs-style line editing has already been there (did anybody ever notice this? :), so i `only' had to add ^P and ^N. The approach is fairly minimalistic, with the advantage of keeping the bloat as small as 864 bytes of .text and 16 bytes of .bss, plus 10*120 bytes malloc'ed history buffer at the first use.
* Clean up various compiler warnings. Most (if not all) were benigngpalmer1996-05-081-2/+2
| | | | Reviewed by: bde
* Reduced and cleaned up #includes.bde1995-12-101-4/+4
|
* Staticize and cleanup.phk1995-12-101-5/+5
|
* Untangled the vm.h include file spaghetti.dg1995-12-071-1/+2
|
* Staticized and '#ifdef notused' stuff we don't use.phk1995-11-291-6/+6
|
* Completed function declarations and/or added prototypes and/or #includesbde1995-11-241-2/+8
| | | | | | | | | | to get the prototypes. Changed some `int's to `boolean_t's. boolean_t's are ints so they are hard to distinguish from ints. Converted function headers to old-style. ddb is written in K&R1 C except where we broke it.
* Remove trailing whitespace.rgrimes1995-05-301-9/+9
|
* Fix up some sloppy coding practices:wollman1994-08-181-7/+7
| | | | | | | | | | | | - Delete redundant declarations. - Add -Wredundant-declarations to Makefile.i386 so they don't come back. - Delete sloppy COMMON-style declarations of uninitialized data in header files. - Add a few prototypes. - Clean up warnings resulting from the above. NB: ioconf.c will still generate a redundant-declaration warning, which is unavoidable unless somebody volunteers to make `config' smarter.
* Change all #includes to follow the current Berkeley style. Some of thesewollman1994-08-131-7/+7
| | | | | | | | | | | | | | | | | | | | | ``changes'' are actually not changes at all, but CVS sometimes has trouble telling the difference. This also includes support for second-directory compiles. This is not quite complete yet, as `config' doesn't yet do the right thing. You can still make it work trivially, however, by doing the following: rm /sys/compile mkdir /usr/obj/sys/compile ln -s M-. /sys/compile cd /sys/i386/conf config MYKERNEL cd ../../compile/MYKERNEL ln -s /sys @ rm machine ln -s @/i386/include machine make depend make
* Make everything compile with -Wtraditional. Make it easier to distributewollman1993-12-191-2/+3
| | | | | | | | | | | a binary link-kit. Make all non-optional options (pagers, procfs) standard, and update LINT to reflect new symtab requirements. NB: -Wtraditional will henceforth be forgotten. This editing pass was primarily intended to detect any constructions where the old code might have been relying on traditional C semantics or syntax. These were all fixed, and the result of fixing some of them means that -Wall is now a realistic possibility within a few weeks.
* Make the LINT kernel compile with -W -Wreturn-type -Wcomment -Werror, andwollman1993-11-251-2/+7
| | | | add same (sans -Werror) to Makefile for future compilations.
* Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, somergrimes1993-10-161-20/+2
| | | | minor cleanup. Added $Id$ to files that did not have any version info, etc
* Initial import, 0.1 + pk 0.2.4-B1rgrimes1993-06-121-0/+268
OpenPOWER on IntegriCloud