#
a2aeb24e |
| 03-Jul-2005 |
Marcel Moolenaar <marcel@FreeBSD.org> |
Implement functions calls from within DDB on ia64. On ia64 a function pointer doesn't point to the first instruction of that function, but rather to a descriptor. The descriptor has the address of th
Implement functions calls from within DDB on ia64. On ia64 a function pointer doesn't point to the first instruction of that function, but rather to a descriptor. The descriptor has the address of the first instruction, as well as the value of the global pointer. The symbol table doesn't know anything about descriptors, so if you lookup the name of a function you get the address of the first instruction. The cast from the address, which is the result of the symbol lookup, to a function pointer as is done in db_fncall is therefore invalid. Abstract this detail behind the DB_CALL macro. By default DB_CALL is defined as db_fncall_generic, which yields the old behaviour. On ia64 the macro is defined as db_fncall_ia64, in which a descriptor is constructed to yield a valid function pointer.
While here, introduce DB_MAXARGS. DB_MAXARGS replaces the existing (local) MAXARGS. The DB_MAXARGS macro can be defined by platforms to create a convenient maximum. By default this will be the legacy 10. On ia64 we define this macro to be 8, for 8 is the maximum number of arguments that can be passed in registers. This avoids having to implement spilling of arguments on the memory stack.
Approved by: re (dwhite)
show more ...
|
Revision tags: release/5.4.0_cvs, release/5.4.0 |
|
#
8cb038b4 |
| 20-Apr-2005 |
Paul Saab <ps@FreeBSD.org> |
Don't enter the debugger if KDB_UNATTENDED is set or if debug.debugger_on_panic=0.
MFC after: 2 weeks
|
Revision tags: release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0 |
|
#
d39d4a6e |
| 01-Nov-2004 |
John Baldwin <jhb@FreeBSD.org> |
- Change the ddb paging "support" to use a variable (db_lines_per_page) to control the number of lines per page rather than a constant. The variable can be examined and changed in ddb as '$lines
- Change the ddb paging "support" to use a variable (db_lines_per_page) to 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
show more ...
|
#
fd32d93b |
| 21-Jul-2004 |
Marcel Moolenaar <marcel@FreeBSD.org> |
Unify db_stack_trace_cmd(). All it did was look up the thread given 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 t
Unify db_stack_trace_cmd(). All it did was look up the thread given 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
show more ...
|
#
37224cd3 |
| 11-Jul-2004 |
Marcel Moolenaar <marcel@FreeBSD.org> |
Mega update for the KDB framework: turn DDB into a KDB backend. Most of the changes are a direct result of adding thread awareness. Typically, DDB_REGS is gone. All registers are taken from the trapf
Mega update for the KDB framework: turn DDB into a KDB backend. 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.
show more ...
|
Revision tags: release/4.10.0_cvs, release/4.10.0, release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0 |
|
#
1e16f609 |
| 31-Jul-2003 |
John Baldwin <jhb@FreeBSD.org> |
Add a one-shot callout facility to db_printf() that executes the registered callout when a specified number of lines have been output. This can be used to implement pagers for ddb commands that outp
Add a one-shot callout facility to db_printf() that executes the registered 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
show more ...
|
Revision tags: release/5.1.0_cvs, release/5.1.0, release/4.8.0_cvs, release/4.8.0 |
|
#
029f0b69 |
| 16-Feb-2003 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Change "dev_t gdbdev" to "void *gdb_arg", some possible paths for GDB will not have a dev_t.
|
Revision tags: release/5.0.0_cvs, release/5.0.0 |
|
#
d43f696c |
| 31-Dec-2002 |
Jake Burkholder <jake@FreeBSD.org> |
Revert previous and move the prototype for db_alt_break to ddb.h.
Requested by: bde (I think)
|
#
93a7aa79 |
| 28-Dec-2002 |
Julian Elischer <julian@FreeBSD.org> |
Add code to ddb to allow backtracing an arbitrary thread. (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, wh
Add code to ddb to allow backtracing an arbitrary thread. (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.
show more ...
|
Revision tags: release/4.7.0_cvs |
|
#
bda9921d |
| 21-Sep-2002 |
Mark Murray <markm@FreeBSD.org> |
Constify to kill some warnings.
|
#
c79408a0 |
| 19-Sep-2002 |
John Baldwin <jhb@FreeBSD.org> |
Implement db_print_backtrace() if DDB is compiled into the kernel. This MD function is just a wrapper around db_stack_trace_cmd() that prints out a backtrace of curthread. Currently, this function
Implement db_print_backtrace() if DDB is compiled into the kernel. This 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
show more ...
|
Revision tags: release/4.6.2_cvs, release/4.6.2, release/4.6.1, release/4.6.0_cvs |
|
#
7102c89a |
| 05-Jun-2002 |
Justin T. Gibbs <gibbs@FreeBSD.org> |
Allow DB_SET() to set all fields in the ddb command structure. This allows external ddb commands to do anyting an internal command can do, including non-standard argument parsing if desired.
|
#
763df836 |
| 23-Mar-2002 |
Bruce Evans <bde@FreeBSD.org> |
Fixed some style bugs in the removal of __P(()). Continuation lines were not outdented to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting.
|
#
14e10f99 |
| 20-Mar-2002 |
Alfred Perlstein <alfred@FreeBSD.org> |
Remove __P.
|
Revision tags: release/4.5.0_cvs, release/4.4.0_cvs |
|
#
17bbfb58 |
| 11-Jul-2001 |
Brian S. Dean <bsd@FreeBSD.org> |
Add 'hwatch' and 'dhwatch' ddb commands analogous to 'watch' and 'dwatch'. The new commands install hardware watchpoints if supported by the architecture and if there are enough registers to cover t
Add 'hwatch' and 'dhwatch' ddb commands analogous to 'watch' and '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
show more ...
|
Revision tags: release/4.3.0_cvs, release/4.3.0, release/4.2.0, release/4.1.1_cvs, release/4.1.0, release/3.5.0_cvs, release/4.0.0_cvs |
|
#
35e61cbd |
| 11-Jan-2000 |
Kazutaka YOKOTA <yokota@FreeBSD.org> |
Add a new mechanism, cndbctl(), to tell the console driver that 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
Add a new mechanism, cndbctl(), to tell the console driver that 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
show more ...
|
Revision tags: release/3.4.0_cvs, release/3.3.0_cvs |
|
#
c3aac50f |
| 28-Aug-1999 |
Peter Wemm <peter@FreeBSD.org> |
$Id$ -> $FreeBSD$
|
Revision tags: release/3.2.0 |
|
#
3000820a |
| 09-May-1999 |
Poul-Henning Kamp <phk@FreeBSD.org> |
add some amount of sanity to the way the gdb stuff finds its device.
I'm not too happy about the result either, but at least it has less chance of backfiring.
This particular feature could be calle
add some amount of sanity to the way the gdb stuff finds its device.
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.
show more ...
|
Revision tags: release/3.1.0 |
|
#
a1c1e16a |
| 27-Jan-1999 |
Matthew Dillon <dillon@FreeBSD.org> |
Changes to support -Wall, -Wcast-qual. Had to make physical code changes in db_lookup() to avoid the *cp = 0 / *cp = ':' combo ( temporary nul-terminate-then-restore-original ) on a const ch
Changes to support -Wall, -Wcast-qual. Had to make physical code changes in db_lookup() to avoid the *cp = 0 / *cp = ':' combo ( temporary nul-terminate-then-restore-original ) on a const char * string.
show more ...
|
Revision tags: release/3.0.0, release/2.2.8, release/2.2.7 |
|
#
748993b8 |
| 13-Jul-1998 |
Bruce Evans <bde@FreeBSD.org> |
Added macros __printflike() and __scanflike() to <sys/cdefs.h>. Use them to `make gcc -Wformat' check formats for all printf-like and scanf-like functions in /usr/src except for the err()/warn() fami
Added macros __printflike() and __scanflike() to <sys/cdefs.h>. 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.
show more ...
|
#
3da6ef3c |
| 08-Jul-1998 |
Bruce Evans <bde@FreeBSD.org> |
Fixed bogus type of valuep in struct db_variable. It was `int *' and became `long *' for alpha, but should always have been `db_expr_t *'. Fixed variable types to match.
|
#
ecbb00a2 |
| 07-Jun-1998 |
Doug Rabson <dfr@FreeBSD.org> |
This commit fixes various 64bit portability problems required for FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change bring
This commit fixes various 64bit portability problems required for 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.
show more ...
|
#
aec5a849 |
| 19-May-1998 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Redo the previous commit in a more Bruce-friendly fashion.
Urged by: bde
|
#
7ee17eea |
| 19-May-1998 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Add "show msgbuf" command
|
Revision tags: release/2.2.6 |
|
#
b7aa38c1 |
| 13-Feb-1998 |
Bruce Evans <bde@FreeBSD.org> |
Ensure that the linker sets for commands exist by putting a standard command in each of them. This removes the need for hard-to-configure dummy instantiations of the sets.
|