summaryrefslogtreecommitdiffstats
path: root/sys/ddb/db_output.c
Commit message (Collapse)AuthorAgeFilesLines
* Fixed loss of whitespace suppression at ends of lines. Whitespacebde2006-10-101-3/+3
| | | | | | | | | | suppression is only needed at ends of lines, but rev.1.32 forced it off precisely there. The --More-- prompt is now cleared by explicitly forcing out the whitespace in "\r \r". It might be better to use the line editor's clearing functions, but these are currently static and not much different.
* Fixed formatting of printing of command tables. WIth the default maxbde2006-10-081-2/+2
| | | | | | | | | | | | | | | output width of 79, only 6 columns of width 12 each fit, but 7 columns were printed. The fix is to pass the width of the next output to db_end_line() and not assume there that this width is always 1. Related unfixed bugs: - 1 character is wasted for a space after the last column - suppression of trailing spaces used to limit the misformatting, but seems to have been lost - in db_examine(), the width of the next output is not know and is still assumed to be 1.
* Simplify the pager support in DDB. Allowing different db commands tojhb2006-07-121-34/+35
| | | | | | | | | | | | | | | | install custom pager functions didn't actually happen in practice (they all just used the simple pager and passed in a local quit pointer). So, just hardcode the simple pager as the only pager and make it set a global db_pager_quit flag that db commands can check when the user hits 'q' (or a suitable variant) at the pager prompt. Also, now that it's easy to do so, enable paging by default for all ddb commands. Any command that wishes to honor the quit flag can do so by checking db_pager_quit. Note that the pager can also be effectively disabled by setting $lines to 0. Other fixes: - 'show idt' on i386 and pc98 now actually checks the quit flag and terminates early. - 'show intr' now actually checks the quit flag and terminates early.
* - Call db_setup_paging() for traceall.cognet2005-10-021-5/+8
| | | | | | | | | | | - Make it so one can't call db_setup_paging() if it has already been called before. traceall needs this, or else the db_setup_paging() call from db_trace_thread() will reset the printed line number, and override its argument. This is not perfect for traceall, because even if one presses 'q' while in the middle of printing a backtrace it will finish printing the backtrace before exiting, as db_trace_thread() won't be notified it should stop, but it is hard to do better without reworking the pager interface a lot more.
* Start each of the license/copyright comments with /*-imp2005-01-061-1/+1
|
* - Change the ddb paging "support" to use a variable (db_lines_per_page) tojhb2004-11-011-8/+24
| | | | | | | | | | | | | | | | | control the number of lines per page rather than a constant. The variable can be examined and changed in ddb as '$lines'. Setting the variable to 0 will effectively turn off paging. - Change db_putchar() to force out pending whitespace before outputting newlines and carriage returns so that one can rub out content on the current line via '\r \r' type strings. - Change the simple pager to rub out the --More-- prompt explicitly when the routine exits. - Add some aliases to the simple pager to make it more compatible with more(1): 'e' and 'j' do a single line. 'd' does half a page, and 'f' does a full page. MFC after: 1 month Inspired by: kris
* Mega update for the KDB framework: turn DDB into a KDB backend.marcel2004-07-101-2/+3
| | | | | | | | | | | | | | | | Most of the changes are a direct result of adding thread awareness. Typically, DDB_REGS is gone. All registers are taken from the trapframe and backtraces use the PCB based contexts. DDB_REGS was defined to be a trapframe on all platforms anyway. Thread awareness introduces the following new commands: thread X switch to thread X (where X is the TID), show threads list all threads. The backtrace code has been made more flexible so that one can create backtraces for any thread by giving the thread ID as an argument to trace. With this change, ia64 has support for breakpoints.
* If not in the debugger or if the user requests it with thenjl2004-01-281-1/+27
| | | | | | | | | debug.ddb_use_printf sysctl, output kernel debugger data to both the console and kernel message buffer via printf. This fixes the case where backtrace() went directly to the console and should help debugging greatly. Thanks to Ian Dowse for the work, minor edits or any bugs are by myself. Submitted by: iedowse
* Add a one-shot callout facility to db_printf() that executes the registeredjhb2003-07-311-0/+66
| | | | | | | | | callout when a specified number of lines have been output. This can be used to implement pagers for ddb commands that output a lot of text. A simple paging function is included that automatically rearms itself when fired. Reviewed by: bde, julian
* Use __FBSDID().obrien2003-06-101-3/+3
|
* Remove __P.alfred2002-03-201-1/+1
|
* $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-2/+2
| | | | may not compile, I can't test it.
* Fixed bogus type of valuep in struct db_variable. It was `int *' andbde1998-07-081-3/+3
| | | | | became `long *' for alpha, but should always have been `db_expr_t *'. Fixed variable types to match.
* This commit fixes various 64bit portability problems required fordfr1998-06-071-3/+3
| | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time.
* Fixed gratuitous ANSIisms.bde1997-04-011-1/+11
|
* 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.
* Attached vm ddb commands `show map', `show vmochk', `show object',bde1996-09-141-3/+20
| | | | | | | | | | | | | | | | | `show vmopag', `show page' and `show pageq'. Moved all vm ddb stuff to the ends of the vm source files. Changed printf() to db_printf(), `indent' to db_indent, and iprintf() to db_iprintf() in ddb commands. Moved db_indent and db_iprintf() from vm to ddb. vm_page.c: Don't use __pure. Staticized. db_output.c: Reduced page width from 80 to 79 to inhibit double spacing for long lines (there are still some problems if words are printed across column 79).
* Clean up various compiler warnings. Most (if not all) were benigngpalmer1996-05-081-3/+6
| | | | Reviewed by: bde
* Remove some now unused printfoids.phk1996-01-231-25/+1
|
* Get rid of two and a half printf in the kernel.phk1996-01-151-180/+2
| | | | | | | | | | | | | | | | | | | | Add more features to the one remaining to handle the job: + signed quantity. # alternate format - left padding * read width as next arg. n numeric in (argument specified) default radix. Fix the DDB debugger to use these. Use vprintf in debug routine in pcvt. The warnings from gcc may become more wrong and intolerable because of this. Warning: I have not checked the entire source for unsupported or changed constructs, but generally belive that there are only a few. Suggested by: bde
* Reduced and cleaned up #includes.bde1995-12-101-3/+4
|
* Untangled the vm.h include file spaghetti.dg1995-12-071-1/+2
|
* Staticized and '#ifdef notused' stuff we don't use.phk1995-11-291-15/+3
|
* Completed function declarations and/or added prototypes and/or #includesbde1995-11-241-5/+5
| | | | | | | | | | 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-8/+8
|
* Print "(null)" instead of crashing for null strings. Null names arebde1994-10-301-1/+3
| | | | | often generated for stack traces. Now inspection of unmapped addresses no longer panics the system.
* Makes gcc silent in sys/ddb.phk1994-09-271-8/+9
|
* 1) Changed ddb into a option rather than a pseudo-device (use options DDBdg1994-08-271-1/+8
| | | | | | | | | | in your kernel config now). 2) Added ps ddb function from 1.1.5. Cleaned it up a bit and moved into its own file. 3) Added \r handing in db_printf. 4) Added missing memory usage stats to statclock(). 5) Added dummy function to pseudo_set so it will be emitted if there are no other pseudo declarations.
* Change all #includes to follow the current Berkeley style. Some of thesewollman1994-08-131-6/+6
| | | | | | | | | | | | | | | | | | | | | ``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-6/+9
| | | | add same (sans -Werror) to Makefile for future compilations.
* Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, somergrimes1993-10-161-42/+2
| | | | minor cleanup. Added $Id$ to files that did not have any version info, etc
* Moved db_end_line after db_printf to eliminate forward reference andrgrimes1993-09-091-10/+23
| | | | shut up the compiler about prototype mismatch.
* * Applied fixes from Bruce Evans to fix COW bugs, >1MB kernel loading,dg1993-07-271-0/+4
| | | | | | | | | | | | | profiling, and various protection checks that cause security holes and system crashes. * Changed min/max/bcmp/ffs/strlen to be static inline functions - included from cpufunc.h in via systm.h. This change improves performance in many parts of the kernel - up to 5% in the networking layer alone. Note that this requires systm.h to be included in any file that uses these functions otherwise it won't be able to find them during the load. * Fixed incorrect call to splx() in if_is.c * Fixed bogus variable assignment to splx() in if_ed.c
* Initial import, 0.1 + pk 0.2.4-B1rgrimes1993-06-121-0/+389
OpenPOWER on IntegriCloud