Commit Graph

16 Commits

Author SHA1 Message Date
Oleksandr Tymoshenko
99b7f1da55 Add minidump support for MIPS 2010-11-07 03:26:22 +00:00
Robert Watson
ccd8bad0bb A first cut at teaching libkvm how to deal with dynamic per-CPU storage
(DPCPU):

A new API, kvm_dpcpu_setcpu(3), selects the active CPU for the purposes
of DPCPU.  Calls to kvm_nlist(3) will automatically translate DPCPU
symbols and return a pointer to the current CPU's version of the data.
Consumers needing to read the same symbol on several CPUs will invoke a
series of setcpu/nlist calls, one per CPU of interest.

This addition makes it possible for tools like netstat(1) to query the
values of DPCPU variables during crashdump analysis, and is based on
similar code handling virtualized global variables.

MFC after:	1 week
Sponsored by:	Juniper Networks, Inc.
2010-03-01 00:27:55 +00:00
Bjoern A. Zeeb
7cf8b4b933 Make libkvm work on live systems and crashdumps with and
without VIMAGE virtualization in the kernel.

If we cannot resolve a symbol try to see if we can find it with
prefix of the virtualized subsystem, currently only "vnet_entry"
by identifying either the vnet of the current process for a
live system or the vnet of proc0 (or of dumptid if compiled
in a non-default way).

The way this is done currently allows us to only touch libkvm
but no single application. Once we are going to virtualize more
subsystems we will have to review this decision for better scaling.

Submitted by:	rwatson (initial version of kvm_vnet.c, lots of ideas)
Reviewed by:	rwatson
Approved by:	re (kib)
2009-07-23 21:12:21 +00:00
Rafal Jaworowski
8e321b7943 Support kernel crash mini dumps on ARM architecture.
Obtained from:	Juniper Networks, Semihalf
2008-11-06 16:20:27 +00:00
Hidetoshi Shimokawa
d7dc9f7649 Re-enable raw dump format support on i386 and amd64 for /dev/fwmem. 2007-06-15 11:35:11 +00:00
Warner Losh
67e405315d Remove the advertising clause. UCB did this some time ago, but these
files were never updated to reflect that.

MFC After: 2 days
2007-01-08 17:35:36 +00:00
Peter Wemm
e9ca6fe47e Teach libkvm how to read minidumps. It turns out that minidumps are
far more convenient for libkvm to work with because of the page table
block at the beginning.  As a result, the MD code is smaller.

libkvm will automatically detect old vs mini dumps on i386 and amd64.

libkvm will handle i386 PAE and non-PAE modes.  There is a PAE flag in
the i386 minidump header to signal the width of the entries in the
page table block.

Other convenient values are also present, such as kernbase and the direct
map addresses on amd64.
2006-04-21 04:32:51 +00:00
Peter Wemm
e55a0cd805 Support crash dumps > 4GB in size on 32 bit platforms. _kvm_kvatop()
returned an lseek offset in a "u_long *" value, which can't express >4GB
offsets on 32 bit machines (eg: PAE).  Change to "off_t *" for all.

Support ELF crashdumps on i386 and amd64.

Support PAE crashdumps on i386.  This is done by auto-detecting the
presence of the IdlePDPT which means that PAE is active.

I used Marcel's _kvm_pa2off strategy and ELF header reader for ELF support
on amd64.  Paul Saab ported the amd64 changes to i386 and we implemented
the PAE support from there.

Note that gdb6 in the src tree uses whatever libkvm supports.  If you want
to debug an old crash dump, you might want to keep an old libkvm.so handy
and use LD_PRELOAD or the like.  This does not detect the old raw dump
format.

Approved by: re
2005-06-29 22:39:41 +00:00
David E. O'Brien
1372519b15 Remove multi-line __P() usage. 2002-03-22 09:22:15 +00:00
David E. O'Brien
69160b1eb7 Remove __P() usage. 2002-03-21 23:54:04 +00:00
Kris Kennaway
6dac8ac9e5 Mark some functions as __printflike() and/or taking const char * arguments
instead of char *.

MFC after:	2 weeks
2001-08-20 12:53:36 +00:00
Peter Wemm
c4a7cdb3b6 Use kldsym(2) to lookup symbol values. This avoids the kvm_mkdb juggling
and is module aware.  Yes, this means that kvm_nlist(3) will find symbols
in loaded modules.  The emulation of the nlist struct is pretty crude but
seems to work well enough for all the users in the tree that I found.
1999-12-27 07:14:58 +00:00
Bruce Evans
480bc7e108 Don't open the swap file. The open descriptor for it hasn't been used
for over 5 years since we switched to using procfs for kvm_uread().
This cleanup was motivated by recent breakage of the default swap file
(/dev/drum) when swapon() has not been called.
1999-08-25 03:01:54 +00:00
Peter Wemm
77721f53be Updates to read the extra indirection in ps_strings. Note that any
static executables that depend on this will need to be relinked (ie: do
this before 'ps'), but the dynamic linked stuff should be OK (ie: 'w')

Obtained from: NetBSD (not much point reinventing the wheel.. :-)
1995-12-09 04:42:51 +00:00
David Greenman
b3bfc7199e Converted 'vmunix' to 'kernel'. 1994-08-05 09:14:37 +00:00
Rodney W. Grimes
58f0484fa2 BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00