summaryrefslogtreecommitdiffstats
path: root/sys/ddb/db_thread.c
Commit message (Collapse)AuthorAgeFilesLines
* Use FOREACH_PROC_IN_SYSTEM instead of using its unrolled form.delphij2007-01-171-2/+2
|
* Simplify the pager support in DDB. Allowing different db commands tojhb2006-07-121-5/+1
| | | | | | | | | | | | | | | | 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.
* Add two helper functions: db_lookup_thread() and db_lookup_proc(). Theyjhb2006-04-251-0/+92
| | | | | | | | | | | | | | | | take the addr value passed to a ddb command and attempt to use it to lookup a struct thread * or struct proc *, respectively. Each function first reparses the passed in value as if it was an ID entered in base 10. For threads the ID is treated as a thread ID, for proceses the ID is treated as a PID. If a thread or proc matching the ID is found, it is returned. For db_lookup_thread(), if the check_pid argument is true and it didn't find a thread with a matching thread ID, it will treat the ID as a PID and look for a matching process. If it finds one it returns the first thread in the process. If none of the ID lookups succeeded, then the functions assume that the passed in address is a thread or proc pointer, respectively. This allows one to use tids, pids, or structure pointers interchangeably in ddb functions that want to lookup threads or processes if desired.
* Start each of the license/copyright comments with /*-imp2005-01-061-1/+1
|
* When printing information on the current thread, such as when enteringrwatson2004-11-231-1/+6
| | | | | | DDB, also print the pid of the process if present. Since much debugging still centers around processes, having the pid is quite helpful.
* - Change the ddb paging "support" to use a variable (db_lines_per_page) tojhb2004-11-011-1/+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
* Mega update for the KDB framework: turn DDB into a KDB backend.marcel2004-07-101-0/+105
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.
OpenPOWER on IntegriCloud