Commit Graph

220 Commits

Author SHA1 Message Date
thorpej b78f59b443 Merge the nathanw_sa branch. 2003-01-18 08:51:40 +00:00
yamt 64f7cc2afc make stack trace on i386 work again.
(signed vs unsigned)
2002-11-13 05:59:28 +00:00
thorpej 1f8b8e3411 Avoid a GCC 3.3 strict alias warning. 2002-11-10 03:24:51 +00:00
thorpej aaf0f03bd6 Fix signed/unsigned comparison warnings. 2002-11-10 03:22:28 +00:00
thorpej 50d19d9171 Fix signed/unsigned comparison warnings. 2002-11-10 03:12:17 +00:00
itohy 94b2e6e61d Dump DDB_* and SYMTAB_SPACE options to opt_ddbparam.h rather than opt_ddb.h.
These options are used in limited files but #include "opt_ddb.h" are
everywhere, and changing them caused almost full recompilation.
2002-11-04 06:24:38 +00:00
perry 6858187df6 /*CONTCOND*/ while (0)'ed macros 2002-11-02 07:20:42 +00:00
scw f7982b5823 Another item on the TODO list:
Add support for cpus where sizeof(register_t) is not necessarily
	the same as sizeof(void *). This is the case on SH5 using the
	ILP32 ABI. On this cpu db_expr_t is, necessarily, 64-bits.
	Unfortunately, in ILP32 mode, ddb will only display the low 32-bits
	of any expression, including registers...
2002-08-26 11:35:22 +00:00
scw a82718b34d Casting from a pointer, to a db_expr_t, has to go via an intptr_t.
(db_expr_t == int64_t on sh5, for example).
2002-08-26 11:34:27 +00:00
drochner 49c4cfb2c5 provide a db_vprintf() which is exactly what the name suggests 2002-06-05 17:53:52 +00:00
matt 98b5a4329f Add db_recover 2002-05-13 20:17:20 +00:00
simonb 14ac06f0bd Add a "show event" ddb command to show the event counters. 2002-02-15 11:18:26 +00:00
simonb 4eaa4d66a8 ANSIfy, KNF.
Make some variables and functions static when not used outside of a module.
Make variables in headers extern.
Delete the unused db_find_watchpoint() function.
2002-02-15 07:33:48 +00:00
jhawk 73c2346377 Add db_symstr(), a parallel interface to db_printsym() that
writes to a string rather than outputs to the supplied printer.
This is convenient for disassemblers that are structured to
build a long string and print it later.

Perhaps db_printsym() should be changed to use this interface...
2002-01-05 20:09:52 +00:00
jhawk 605db0bb09 ddb(9) 2002-01-05 01:48:10 +00:00
jhawk a21d1ea7ac Convenience variables (workXX) don't work, so don't document them. 2001-12-31 00:35:21 +00:00
lukem 99bccc3cab - pull in opt_kgdb.h where necessary
- replace opt_kgdb_machdep.h with opt_kgdb.h
- defparam opt_kgdb.h:
	KGDB_DEV KGDB_DEVNAME KGDB_DEVADDR KGDB_DEVRATE KGDB_DEVMODE
- move from opt_ddbparam.h to opt_ddb.h:
	DDB_FROMCONSOLE DDB_ONPANIC DDB_HISTORY_SIZE DDB_BREAK_CHAR SYMTAB_SPACE
- replace KGDBDEV with KGDB_DEV
- replace KGDBADDR with KGDB_DEVADDR
- replace KGDBMODE with KGDB_DEVMODE
- replace KGDBRATE with KGDB_DEVRATE
- use `9600' instead of `0x2580' for 9600 baud rate
- use correct quotes for  options KGDB_DEVNAME="\"com\""
- use correct quotes for  options KGDB_DEV="17*256+0"
- remove unnecessary dependancy on Makefile for kgdb_stub.o
- minor whitespace cleanup
2001-11-20 08:43:19 +00:00
lukem 2565646230 don't need <sys/types.h> when including <sys/param.h> 2001-11-15 09:47:59 +00:00
lukem 1ac69d9cb3 add RCSIDs 2001-11-12 22:54:03 +00:00
thorpej 47514a31be Remove unneeded declarations of the db_machine_init() function. The
ARM ports are the only ones that actually have one, and it is about
to change.
2001-11-09 06:52:23 +00:00
christos e415081a60 PR/14498: Wesley Chen: Identify loaded modules vs. kernel, because we don't
load the elf header with them.
2001-11-08 15:01:35 +00:00
christos 500d44e36c PR/14498: Wesley Chen: Print a return after enumerating the matching symbols. 2001-11-08 15:00:17 +00:00
bjh21 cabab13edd When setting watchpoints, call pmap_update() for each watchpoint, rather
than at the end, since they may be in different pmaps.  This avoids a null
pointer dereference that was causing panics when resuming from DDB on arm26.
2001-10-13 15:17:38 +00:00
chs 3fb05f05f8 use a for loop instead of goto. 2001-09-15 18:20:53 +00:00
thorpej 16c229ea7c Optimization suggested by Bill Sommerfeld: Keep a hint as to the
"earliest" firing callout in a bucket.  This allows us to skip
the scan up the bucket if no callouts are due in the bucket.

A cheap O(1) hint update is done at callout insertion (if new callout
is earlier than hint) and removal (is bucket empty).  A thorough
refresh of the hint is done when the bucket is traversed.

This doesn't matter much on machines with small values of hz
(e.g. i386), but on systems with large values of hz (e.g. Alpha),
it has a definite positive effect.

Also, keep the callwheel stats in evcnts, so that you can view them
with "vmstat -e".
2001-09-11 04:32:19 +00:00
chris 0e7661f023 Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
2001-09-10 21:19:08 +00:00
thorpej fae2a1befd Add `show malloc' to dump the internal state of the MALLOC_DEBUG code. 2001-08-17 01:00:10 +00:00
bjh21 286faf2070 Extra sanity checking on ELF headers: Make sure the bootloader actually
loaded (or claims to have loaded) everything we need.
2001-07-31 22:31:47 +00:00
bjh21 34c3239d32 Don't depend on the bootloader's having loaded the .shstrtab section
in order to load the symbol table.  Instead of using the sections
called ".symtab" and ".strtab", use the first SYMTAB section (the
ELF spec says there should currently only be one) and the STRTAB
section that's linked to it.  I believe this is more robust, and it
certainly makes life easier for the bootloader.
2001-07-31 19:14:18 +00:00
atatat 124ae5b65c Add an easy way to dump the message buffer from ddb. 2001-07-31 04:28:16 +00:00
mrg 506cbe39be allow one to #define DB_MAX_LINE and DB_MAX_WIDTH independantly. 2001-07-01 12:16:25 +00:00
simonb 18b2f7e6a1 Add a port to IBM's PPC405GP Reference Board (the "walnut")
by Eduardo Horvath and Simon Burge of Wasabi Systems.

IBM 4xx series CPU features:
 - New pmap and revised trap handler.
 - Support on-chip timers, PCI controller, UARTs
 - Framework for on-chip ethernet and watchdog timer.
General PowerPC features:
 - Add in-kernel PPC floating point emulation
 - New in{,4}_cksum that is between 1.5 and 5 times faster than the
   old version depending on CPU type.
General changes:
 - Kernel support for generic dbsym-style symbols.
2001-06-13 06:01:44 +00:00
matt 9086deaf4d Default to kernel_map if no addr is available. 2001-06-03 00:32:25 +00:00
chs 821ec03ed9 replace vm_map{,_entry}_t with struct vm_map{,_entry} *. 2001-06-02 18:09:08 +00:00
mrg c13e3a6693 use _KERNEL_OPT 2001-05-30 11:40:35 +00:00
ross 818513678d The current API for MD support doesn't directly support the documented /u
option to show reg /u.  Fix this by adding a modif[ier] field to struct
db_variable.
2001-05-13 01:38:53 +00:00
thorpej 1c3a62e066 Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative.  It may be possible to
optimize these a little more.
2001-04-24 04:30:50 +00:00
msaitoh 9767692eee fix invalid reference to $fromconsole via DDB 2001-04-11 23:02:12 +00:00
cgd f7566f8058 Avoid crud after #endif. 2001-02-24 00:00:26 +00:00
cgd e4eb4c6cd5 #include <systm.h> for string fn prototypes. 2001-02-24 00:00:12 +00:00
cgd 42e019d568 put crud after #endif in comments 2001-02-15 21:59:38 +00:00
jhawk 35483d9169 alphabetize db_command tables 2001-02-11 21:12:24 +00:00
jdolecek 9818f641c3 make db_command_table[] const; since there is no way to dynamically extend
or modify the table at the moment, there is no functionality lost.
See also the discussion on tech-kern (Subject: 'machine' DDB command).
2001-01-24 20:54:41 +00:00
jdolecek 8b24036797 Require the machine-dependant DDB commands to be in db_machine_command_table[]
and link it directly to db_command_table[] so that it's not necessary
to do this at runtime. Make db_machine_command_table[] const on all ports.
g/c now unneded stuff, like db_machine_commands_install(), db_machine_init()

Patch written by enami.
2001-01-22 13:56:55 +00:00
jdolecek d5d431e8ae make db_[e]regs[] const 2001-01-18 10:54:27 +00:00
enami 1199c16835 db_command_table needs to be writable at least when DB_MACHINE_COMMANDS
is defined.
2001-01-18 08:52:26 +00:00
jdolecek 9aa0a0185f constify a little 2001-01-17 19:50:03 +00:00
jmc 5649071c21 Add x/m option functionality 2000-12-28 07:30:06 +00:00
jhawk 33e37f6d03 When we hit a breakpoint in a process, print the pid of the process as
well as the command name (p_comm) of the process.
2000-12-20 15:42:37 +00:00
thorpej 366b23111a Make sure values for a %llx are long long. 2000-11-28 21:44:34 +00:00