aboutsummaryrefslogtreecommitdiff
path: root/sys/ddb/ddb.h
Commit message (Collapse)AuthorAgeFilesLines
* - Change the ddb paging "support" to use a variable (db_lines_per_page) toJohn Baldwin2004-11-011-2/+1
| | | | | | | | | | | | | | | | | | | | 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
* Unify db_stack_trace_cmd(). All it did was look up the thread givenMarcel Moolenaar2004-07-211-1/+0
| | | | | | | | | | | | | | | | | | the thread ID and call db_trace_thread(). Since arm has all the logic in db_stack_trace_cmd(), rename the new DB_COMMAND function to db_stack_trace to avoid conflicts on arm. While here, have db_stack_trace parse its own arguments so that we can use a more natural radix for IDs. If the ID is not a thread ID, or more precisely when no thread exists with the ID, try if there's a process with that ID and return the first thread in it. This makes it easier to print stack traces from the ps output. requested by: rwatson@ tested on: amd64, i386, ia64 Notes: svn path=/head/; revision=132482
* Mega update for the KDB framework: turn DDB into a KDB backend.Marcel Moolenaar2004-07-101-33/+9
| | | | | | | | | | | | | | | | | | | 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
* Add a one-shot callout facility to db_printf() that executes the registeredJohn Baldwin2003-07-311-0/+8
| | | | | | | | | | | | 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
* Change "dev_t gdbdev" to "void *gdb_arg", some possible paths for GDBPoul-Henning Kamp2003-02-161-1/+1
| | | | | | | will not have a dev_t. Notes: svn path=/head/; revision=111017
* Revert previous and move the prototype for db_alt_break to ddb.h.Jake Burkholder2002-12-311-0/+3
| | | | | | | Requested by: bde (I think) Notes: svn path=/head/; revision=108512
* Add code to ddb to allow backtracing an arbitrary thread.Julian Elischer2002-12-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | (show thread {address}) Remove the IDLE kse state and replace it with a change in the way threads sahre KSEs. Every KSE now has a thread, which is considered its "owner" however a KSE may also be lent to other threads in the same group to allow completion of in-kernel work. n this case the owner remains the same and the KSE will revert to the owner when the other work has been completed. All creations of upcalls etc. is now done from kse_reassign() which in turn is called from mi_switch or thread_exit(). This means that special code can be removed from msleep() and cv_wait(). kse_release() does not leave a KSE with no thread any more but converts the existing thread into teh KSE's owner, and sets it up for doing an upcall. It is just inhibitted from being scheduled until there is some reason to do an upcall. Remove all trace of the kse_idle queue since it is no-longer needed. "Idle" KSEs are now on the loanable queue. Notes: svn path=/head/; revision=108338
* Constify to kill some warnings.Mark Murray2002-09-211-1/+1
| | | | Notes: svn path=/head/; revision=103746
* Implement db_print_backtrace() if DDB is compiled into the kernel. ThisJohn Baldwin2002-09-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | MD function is just a wrapper around db_stack_trace_cmd() that prints out a backtrace of curthread. Currently, this function is only implemented on i386 and alpha (and the alpha version isn't quite tested yet, will do that in a bit). Other changes: - For i386, fix a bug in the raw frame address case. The eip we extract from the passed in frame address does not match the frame we received. Thus, instead of printing a bogus frame with the wrong eip, go ahead and advance frame down to the same frame as the eip we are using. - For alpha, attempt to add a way of doing a raw trace for alpha. Instead of passing a frame address in 'addr', pass in a pointer to a structure containing PC and KSP and use those to start the backtrace. The alpha db_print_backtrace() uses asm to read in the current PC and KSP values into such a request. Tested on: i386 Requested by: many Notes: svn path=/head/; revision=103646
* Allow DB_SET() to set all fields in the ddb command structure. ThisJustin T. Gibbs2002-06-051-5/+5
| | | | | | | | allows external ddb commands to do anyting an internal command can do, including non-standard argument parsing if desired. Notes: svn path=/head/; revision=97880
* Fixed some style bugs in the removal of __P(()). Continuation linesBruce Evans2002-03-231-2/+2
| | | | | | | | were not outdented to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting. Notes: svn path=/head/; revision=93009
* Remove __P.Alfred Perlstein2002-03-201-24/+24
| | | | Notes: svn path=/head/; revision=92756
* Add 'hwatch' and 'dhwatch' ddb commands analogous to 'watch' andBrian S. Dean2001-07-111-0/+2
| | | | | | | | | | | | | '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 Notes: svn path=/head/; revision=79573
* Add a new mechanism, cndbctl(), to tell the console driver thatKazutaka YOKOTA2000-01-111-1/+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 Notes: svn path=/head/; revision=55823
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* add some amount of sanity to the way the gdb stuff finds its device.Poul-Henning Kamp1999-05-091-1/+11
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=46783
* Changes to support -Wall, -Wcast-qual. Had to make physical code changesMatthew Dillon1999-01-271-2/+2
| | | | | | | | in db_lookup() to avoid the *cp = 0 / *cp = ':' combo ( temporary nul-terminate-then-restore-original ) on a const char * string. Notes: svn path=/head/; revision=43289
* Added macros __printflike() and __scanflike() to <sys/cdefs.h>.Bruce Evans1998-07-131-4/+3
| | | | | | | | | | | Use them to `make gcc -Wformat' check formats for all printf-like and scanf-like functions in /usr/src except for the err()/warn() family. err() isn't quite printf-like since its format arg can legitimately be NULL. syslog() isn't quite printf-like, but gcc already accepts %m, even for plain printf() when it shouldn't. Notes: svn path=/head/; revision=37614
* Fixed bogus type of valuep in struct db_variable. It was `int *' andBruce Evans1998-07-081-5/+5
| | | | | | | | 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-7/+7
| | | | | | | | | | | | | 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
* Redo the previous commit in a more Bruce-friendly fashion.Poul-Henning Kamp1998-05-191-2/+1
| | | | | | | Urged by: bde Notes: svn path=/head/; revision=36197
* Add "show msgbuf" commandPoul-Henning Kamp1998-05-191-1/+2
| | | | Notes: svn path=/head/; revision=36181
* Ensure that the linker sets for commands exist by putting a standardBruce Evans1998-02-131-2/+1
| | | | | | | | command in each of them. This removes the need for hard-to-configure dummy instantiations of the sets. Notes: svn path=/head/; revision=33296
* 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
* Support statically attaching of ddb commands in non-ddb modules.Bruce Evans1996-09-141-9/+41
| | | | | | | | | | | | | | | | | | | The details are hidden in the DB_COMMAND(cmd_name, func_name) and DB_SHOW_COMMAND(cmd_name, func_name) macros. DB_COMMAND() adds to the top-level ddb command table and DB_SHOW_COMMAND adds to the `show' subtable. Most external commands will probably be `show' commands with no side effects. They should check their pointer args more carefully than `show map' :-), or ddb should trap internal faults better (like it does for memory accesses). The vm ddb commands are temporarily unattached. ddb.h: Also declare `db_indent' and db_iprintf() which will replace vm's `indent' and iprintf(). Notes: svn path=/head/; revision=18296
* Clean up various compiler warnings. Most (if not all) were benignGary Palmer1996-05-081-2/+1
| | | | | | | Reviewed by: bde Notes: svn path=/head/; revision=15680
* Staticize and cleanup.Poul-Henning Kamp1995-12-101-2/+1
| | | | Notes: svn path=/head/; revision=12720
* Untangled the vm.h include file spaghetti.David Greenman1995-12-071-2/+1
| | | | Notes: svn path=/head/; revision=12662
* Staticized and '#ifdef notused' stuff we don't use.Poul-Henning Kamp1995-11-291-4/+1
| | | | Notes: svn path=/head/; revision=12515
* Completed function declarations and/or added prototypes.Bruce Evans1995-11-241-57/+68
| | | | | | | | | Removed `extern' from prototypes. Sorted prototypes. Uniformized idempotency ifdefs. Notes: svn path=/head/; revision=12472
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-3/+3
| | | | Notes: svn path=/head/; revision=8876
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'Bruce Evans1995-03-161-1/+4
| | | | | | | | | (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones. Notes: svn path=/head/; revision=7090
* Woops, wrong solution to the problem. Backed out previous fix to ddb.h, andDavid Greenman1994-09-271-1/+2
| | | | | | | | | | nuked the db_printf() declaration from db_output.h. Reviewed by: Submitted by: Obtained from: Notes: svn path=/head/; revision=3143
* Nuked db_printf() prototype; it now clashes with the one in db_output.h.David Greenman1994-09-271-2/+1
| | | | Notes: svn path=/head/; revision=3142
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.Rodney W. Grimes1994-05-251-1/+2
| | | | | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman Notes: svn path=/head/; revision=1549
* Make the LINT kernel compile with -W -Wreturn-type -Wcomment -Werror, andGarrett Wollman1993-11-251-0/+109
add same (sans -Werror) to Makefile for future compilations. Notes: svn path=/head/; revision=798