uwe
c1a5c8576e
Add missing $NetBSD$ comment at the beginning.
2018-05-27 12:24:36 +00:00
ozaki-r
d52b83d757
ddb: rename "show lockstat" to "show lockstats" to avoid conflicting with lockstat(8)
...
Requested by mrg@
2018-03-19 08:41:21 +00:00
ozaki-r
5e1f20377c
Don't pass a unset address to lockdebug_lock_print
2018-03-16 04:45:20 +00:00
ozaki-r
e611636f76
Add a new command, show all locks, which shows information of active locks
...
The command shows information of all active (i.e., being held) locks that are
tracked through either of LWPs or CPUs by the LOCKDEBUG facility. The /t
modifier additionally shows a backtrace for each LWP additionally. This
feature is useful for debugging especially to analyze deadlocks.
The command is useful only if LOCKDEBUG is enabled.
2018-03-16 04:44:51 +00:00
ozaki-r
1d919413b1
Add a new command, show lockstat, which shows statistics of locks
...
Currently the command shows the number of allocated locks.
The command is useful only if LOCKDEBUG is enabled.
2018-03-16 04:37:55 +00:00
mlelstv
627f70e4f9
enums might be unsigned.
2018-03-05 07:47:21 +00:00
mlelstv
2428c0d42d
Add command to print device list.
2018-03-04 07:14:50 +00:00
sevan
ef01774665
Opt to print a backtrace on panic by default with the intention of improving bug reports.
...
Instead of relying on ddb.onpanic=2, introduce a new sysctl called dumpstack to handle this.
via <jmcneill> channeled through <mrg> on tech-kern[1]
[1] https://mail-index.netbsd.org/tech-kern/2018/02/15/msg023103.html
2018-02-17 00:41:09 +00:00
mrg
604bbcaa40
avoid leftshift of an unsigned value
2018-02-04 09:17:54 +00:00
christos
bba310736c
- add ddb.panicstackframes to avoid scrolling the interesting parts of panic
...
stacktraces off.
- change valuep to void * to avoid casts
- sort and use c99 initializers in variables array
2017-12-28 17:51:19 +00:00
christos
d3c8c77eb5
remove more DB_ELFSIZE
2017-11-06 04:08:02 +00:00
christos
ad97afb146
use Elf_Sym ** instead of casting.
2017-11-04 22:17:55 +00:00
maxv
4e8a8f71db
Handle absolute relocations coming from the kernel: preserve SHN_ABS in
...
the kernel and module symbols, and when relocating a symbol that has
SHN_ABS, take its value as-is and don't return an error if it equals zero.
Sent on tech-kern@.
2017-11-03 09:59:07 +00:00
joerg
e64612f440
Revert printf return value change.
2017-10-27 12:25:14 +00:00
utkarsh009
f11595bab5
[syzkaller] Cast all the printf's to (void *)
...
> as a result of new printf(9) declaration.
2017-10-27 09:59:16 +00:00
joerg
6ff696c6b4
Add ddb command to find a vnode by the address of its lock.
...
This makes it much easier to convert lockstat traces into understandable
data.
2017-01-11 12:17:34 +00:00
christos
ea1524ad60
add a simple stacktrace macro
2017-01-04 21:25:41 +00:00
ozaki-r
4f0eb37aac
ddb: rename show arptab to show routes
...
show arptab command of ddb is now inappropriate because it actually dumps
routes but arp entries aren't routes anymore. So rename it to show routes
and move the code from if_arp.c to route.c.
ok christos@
2016-04-13 00:47:01 +00:00
skrll
1a04d8c9f0
Improve ddb(4) show kernhist
...
1) really prints all the histories merged together (rather than just the
"first" when no argument specified
2) dumps a single history when an argument is given, e.g.
"show kernhist usbhist"
3) uses db_printf correctly
2016-04-06 21:56:24 +00:00
matt
12f31456a1
Add support for 'q' qualifier for 64-bit values on examine and write.
...
Align data to long so that the MD parts can use aligned load/stores.
Don't use db_extend but use db_expr_t based expressions.
2015-06-06 22:06:05 +00:00
mrg
8b5b0b5a2a
only call the on-enter commands if we're not recursing.
...
avoids having a fault in the on-enter commands repeating.
2015-05-21 08:23:22 +00:00
ozaki-r
9f84c587df
Don't use an unset value as an address
...
Instead, show usage if no address is passed.
2015-02-27 00:47:30 +00:00
christos
1a5609a923
we can use show callout now from crash
2015-02-08 19:41:39 +00:00
uebayasi
509aacc598
Define ddb module.
2014-11-16 05:46:27 +00:00
matt
f1926b3d6f
Add description of inst_return
2014-09-19 17:29:01 +00:00
matt
bac0f3665b
Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get
...
a correctly typed pointer.
2014-09-05 09:27:24 +00:00
jakllsch
24761fbad1
Make this build.
...
Hi jakllsch@.
2014-04-12 19:25:48 +00:00
jakllsch
ff1b98f16b
Unbreak db_cpu_*. Allows backtraces on i386 to progress beyond the
...
first function by not doing a NULL-deref in the debugger.
Bug located by me. Patch implementation by riastradh@. Hi rmind@.
2014-04-12 19:01:49 +00:00
pooka
4f6fb3bf35
Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
...
the sysctl link sets are processed, and remove redundancy.
Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.
2014-02-25 18:30:08 +00:00
christos
52f1b2aafb
add a return in the panic message
2014-01-22 15:20:40 +00:00
rmind
df64447ca6
Remove cpu_queue (and thus eleminate another use of CIRCLEQ) by replacing
...
its uses with cpu_infos array. Extra testing by christos@.
2013-11-24 21:58:38 +00:00
christos
c60f6fad95
fix userland build, by moving all the unused stuff inside ifdef _KERNEL
2013-10-19 15:20:52 +00:00
martin
9197dcbb29
Mark a potentialy unused variable
2013-10-19 14:33:07 +00:00
christos
8e615742be
need <sys/types.h> for various crap that other headers use (pid_t etc).
2013-02-10 14:44:14 +00:00
apb
161fe293bc
Hook the new ddb/db_panic.c to the build.
2013-02-10 11:05:31 +00:00
apb
bb0eb3bd82
Move the DDB-specific part of vpanic() to a new db_panic() function,
...
defined in ddb/db_panic.c and declared in ddb/ddbvar.h. No functional
change.
The copyright years in db_panic.c are the years in which changes were
made to the code that has now been moved to db_panic.c. No pre-NetBSD
copyright notice is needed because revision 1.12 of subr_prf.c had only
the trivial "#ifdef DDB \\ Debugger(); \\ #endif"
2013-02-10 11:04:19 +00:00
apb
bf2dfb8fc5
read_symtab_from_file used to be defined in ddb/db_aout.c, but that
...
file was deleted in 2011. Now delete the declaration in ddb/ddbvar.h.
2013-02-10 10:26:12 +00:00
christos
fa04e235ed
remove the new command not the old one.
2013-01-06 04:17:27 +00:00
christos
cc78507c3a
remove previous, dmesg just works.
2013-01-06 03:34:52 +00:00
christos
81736cc9cd
Add "show dmesg" that prints the contents of the message buffer.
2013-01-06 03:23:55 +00:00
christos
cedbce7adf
Add "show panic" that shows the current panic string. two ports had it, and
...
it could be easily made MI.
2013-01-05 15:23:27 +00:00
matt
6787e5f9af
Use _KERNEL_OPT
2012-09-01 01:13:51 +00:00
matt
a1e2d01f42
Make DB_MAX_LINES a kernel option
2012-09-01 00:28:12 +00:00
dsl
e21a34c25e
Add some pre-processor magic to verify that the type of the data item
...
passed to sysctl_createv() actually matches the declared type for
the item itself.
In the places where the caller specifies a function and a structure
address (typically the 'softc') an explicit (void *) cast is now needed.
Fixes bugs in sys/dev/acpi/asus_acpi.c sys/dev/bluetooth/bcsp.c
sys/kern/vfs_bio.c sys/miscfs/syncfs/sync_subr.c and setting
AcpiGbl_EnableAmlDebugObject.
(mostly passing the address of a uint64_t when typed as CTLTYPE_INT).
I've test built quite a few kernels, but there may be some unfixed MD
fallout. Most likely passing &char[] to char *.
Also add CTLFLAG_UNSIGNED for unsiged decimals - not set yet.
2012-06-02 21:36:41 +00:00
rmind
4b760398c3
Remove MALLOC_DEBUG and MALLOCLOG, which is dead code after malloc(9) move
...
to kmem(9). Note: kmem(9) has debugging facilities under DEBUG/DIAGNOSTIC.
However, expensive kmguard and debug_freecheck have to be enabled manually.
2012-04-28 23:03:39 +00:00
joerg
66dd2755f5
Add __printflike attribution to use vprintf and friends with an argument
...
as format string.
2012-03-15 02:02:20 +00:00
christos
b1c34b0c9a
add __printflike where needed
2012-02-10 02:14:23 +00:00
christos
440da768fe
fix printf formats.
2012-02-10 02:14:04 +00:00
christos
d456592874
Re-indent, and factor out strlen() now that we have more space.
...
No functional change.
2012-02-09 17:07:07 +00:00
christos
8e619ae19a
Remove bogus code in the non kernel case involving end[]. In this case
...
end[] is the end of the crash program symbols, so using that as the
end of the kernel symbol table is just wrong.
2012-02-09 00:21:23 +00:00