aboutsummaryrefslogtreecommitdiff
path: root/sys/ddb/db_output.c
Commit message (Collapse)AuthorAgeFilesLines
* There is not a good reason to have a different prototype for db_printf()Attilio Rao2010-05-111-2/+4
| | | | | | | | | | | when compared to printf(). Unify it by returning the number of characters displayed for db_printf() as well. MFC after: 7 days Notes: svn path=/head/; revision=207922
* Add a missing include which was erroneusly left out from the previousAttilio Rao2008-08-181-0/+2
| | | | | | | | | commit. Sponsored by: Nokia Notes: svn path=/head/; revision=181842
* Bufferize the output for DDB printouts.Attilio Rao2008-08-181-15/+87
| | | | | | | | | | | | In order to CATER this, DDB buffered output can be choosen at compile time through the option DDB_BUFR_SIZE=nbytes where nbytes choose the size of the buffer (suggested size is 128 bytes), which should be manually specified in any interested config file. Sponsored by: Nokia Notes: svn path=/head/; revision=181840
* Add a new DDB(4) facility, output capture. Input and output from DDB may beRobert Watson2007-12-251-0/+8
| | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=174910
* Fixed loss of whitespace suppression at ends of lines. WhitespaceBruce Evans2006-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. Notes: svn path=/head/; revision=163190
* Fixed formatting of printing of command tables. WIth the default maxBruce Evans2006-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. Notes: svn path=/head/; revision=163134
* Simplify the pager support in DDB. Allowing different db commands toJohn Baldwin2006-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. Notes: svn path=/head/; revision=160312
* - Call db_setup_paging() for traceall.Olivier Houchard2005-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. Notes: svn path=/head/; revision=150842
* Start each of the license/copyright comments with /*-Warner Losh2005-01-061-1/+1
| | | | Notes: svn path=/head/; revision=139747
* - Change the ddb paging "support" to use a variable (db_lines_per_page) toJohn Baldwin2004-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 Notes: svn path=/head/; revision=137117
* Mega update for the KDB framework: turn DDB into a KDB backend.Marcel Moolenaar2004-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. Notes: svn path=/head/; revision=131952
* If not in the debugger or if the user requests it with theNate Lawson2004-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 Notes: svn path=/head/; revision=125134
* Add a one-shot callout facility to db_printf() that executes the registeredJohn Baldwin2003-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 Notes: svn path=/head/; revision=118268
* Use __FBSDID().David E. O'Brien2003-06-101-3/+3
| | | | Notes: svn path=/head/; revision=116176
* Remove __P.Alfred Perlstein2002-03-201-1/+1
| | | | Notes: svn path=/head/; revision=92756
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Merge the cons.c and cons.h to the best of my ability. alpha may orPoul-Henning Kamp1999-08-091-2/+2
| | | | | | | may not compile, I can't test it. Notes: svn path=/head/; revision=49558
* Fixed bogus type of valuep in struct db_variable. It was `int *' andBruce Evans1998-07-081-3/+3
| | | | | | | | became `long *' for alpha, but should always have been `db_expr_t *'. Fixed variable types to match. Notes: svn path=/head/; revision=37504
* This commit fixes various 64bit portability problems required forDoug Rabson1998-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. Notes: svn path=/head/; revision=36735
* Fixed gratuitous ANSIisms.Bruce Evans1997-04-011-1/+11
| | | | Notes: svn path=/head/; revision=24490
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notPeter Wemm1997-02-221-1/+1
| | | | | | | ready for it yet. Notes: svn path=/head/; revision=22975
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-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. Notes: svn path=/head/; revision=21673
* Attached vm ddb commands `show map', `show vmochk', `show object',Bruce Evans1996-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). Notes: svn path=/head/; revision=18298
* Clean up various compiler warnings. Most (if not all) were benignGary Palmer1996-05-081-3/+6
| | | | | | | Reviewed by: bde Notes: svn path=/head/; revision=15680
* Remove some now unused printfoids.Poul-Henning Kamp1996-01-231-25/+1
| | | | Notes: svn path=/head/; revision=13594
* Get rid of two and a half printf in the kernel.Poul-Henning Kamp1996-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 Notes: svn path=/head/; revision=13446
* Reduced and cleaned up #includes.Bruce Evans1995-12-101-3/+4
| | | | Notes: svn path=/head/; revision=12734
* Untangled the vm.h include file spaghetti.David Greenman1995-12-071-1/+2
| | | | Notes: svn path=/head/; revision=12662
* Staticized and '#ifdef notused' stuff we don't use.Poul-Henning Kamp1995-11-291-15/+3
| | | | Notes: svn path=/head/; revision=12515
* Completed function declarations and/or added prototypes and/or #includesBruce Evans1995-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. Notes: svn path=/head/; revision=12473
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-8/+8
| | | | Notes: svn path=/head/; revision=8876
* Print "(null)" instead of crashing for null strings. Null names areBruce Evans1994-10-301-1/+3
| | | | | | | | often generated for stack traces. Now inspection of unmapped addresses no longer panics the system. Notes: svn path=/head/; revision=4016
* Makes gcc silent in sys/ddb.Poul-Henning Kamp1994-09-271-8/+9
| | | | Notes: svn path=/head/; revision=3140
* 1) Changed ddb into a option rather than a pseudo-device (use options DDBDavid Greenman1994-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. Notes: svn path=/head/; revision=2320
* Change all #includes to follow the current Berkeley style. Some of theseGarrett Wollman1994-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 Notes: svn path=/head/; revision=2056
* Make everything compile with -Wtraditional. Make it easier to distributeGarrett Wollman1993-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. Notes: svn path=/head/; revision=879
* Make the LINT kernel compile with -W -Wreturn-type -Wcomment -Werror, andGarrett Wollman1993-11-251-6/+9
| | | | | | | add same (sans -Werror) to Makefile for future compilations. Notes: svn path=/head/; revision=798
* Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, someRodney W. Grimes1993-10-161-42/+2
| | | | | | | minor cleanup. Added $Id$ to files that did not have any version info, etc Notes: svn path=/head/; revision=623
* Moved db_end_line after db_printf to eliminate forward reference andRodney W. Grimes1993-09-091-10/+23
| | | | | | | shut up the compiler about prototype mismatch. Notes: svn path=/head/; revision=430
* * Applied fixes from Bruce Evans to fix COW bugs, >1MB kernel loading,David Greenman1993-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 Notes: svn path=/head/; revision=200
* Initial import, 0.1 + pk 0.2.4-B1Rodney W. Grimes1993-06-121-0/+389
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=4