Commit Graph

17 Commits

Author SHA1 Message Date
itojun 8ac99d48f2 strlcat 2003-07-15 05:59:58 +00:00
atatat 535d709586 Build main.c with LOCKDEBUG defined so that it gets the larger kbit
definition.  Since we're now passing it into pmap.c which is already
compiled that way, it would be nice if it was the right size.

Also, fix a memset bug that caused a segmentation fault when printing
the kernel's vm_map.
2003-05-04 15:09:45 +00:00
atatat a88940798c Add some more intricate groveler options:
-A address   Dumps the vm_amap structure found at address.

     -E address   Dumps the vm_map_entry structure found at address.

     -S address   Dumps the vmspace structure found at address.

     -V address   Dumps the vm_map structure found at address.

This required reorganizing the code a little, which led to some
cleanup (yay!).  These new methods are executed without any extra
privileges, so you need read access on /dev/mem or on the kernel core
into which you are digging.

This should be useful for, eg, examining amaps are corrupt when being
destroyed, which can cause a kernel panic (and, hence, are no longer
connected to a map entry, or the map entry is no longer connected to a
vm_map/vmspace).

The options in the man page have also been reorganized.
2003-04-04 03:49:20 +00:00
atatat 2242d20a09 Add the capability to dump the struct vm_amap and the am_anon,
am_bckptr, am_slots, and am_anon data, if the vm_map_entry has an
amap.  This adds three new debug "bits" to the -D argument, so the
namei cache dumping "bit" has been moved up.

Also, change the * that gets emitted with -vv to indicate the number
of pages skipped and the size of the area (in kilobytes).
2003-03-28 23:10:32 +00:00
atatat 6d45c1cd99 Clean up code in places, add some more (possible) submap names, make
better use of the submap names when dumping the kernel map, clean up
the "interface" between the main and LOCKDEBUG dependent pmap modules,
and make the heap identification work better.
2003-02-27 04:10:36 +00:00
atatat 87437f0b78 Oops. Missed some possible UVM_ET_IS*() macro uses. 2003-02-23 01:08:29 +00:00
atatat fb9b07a6a7 Properly print the VM_MAP_TOPDOWN flag if it is set, document the
VM_MAP_TOPDOWN flag (and the VM_MAP_DYING flag, since it never got
documented before), minor tweak to one of the examples, and use the
UVM_ET_IS*() macros instead of doing the same work manually.
2003-02-22 17:45:04 +00:00
atatat a26b7f4d29 Make pmap work on LOCKDEBUG *and* non-LOCKDEBUG kernels (previously it
would fail in spectacular ways on LOCKDEBUG kernels) by compiling the
groveler code twice (the second time with LOCKDEBUG defined so that
the appropriate structures get larger in the right way).  We currently
decide if we are operating on a kernel with LOCKDEBUG enabled if the
kernel's vm_map has referential integrity between a few pointers
and/or values.

Also, if you use more than one -v, you get a * on a line by itself in
between gaps in entries.  It makes finding gaps much easier visually.
2003-01-08 20:25:12 +00:00
thorpej e0e584cdfa Avoid a trigraph, and fix printf formats. 2002-12-06 03:05:04 +00:00
thorpej 35d6519b2d Don't truncate the vm_map_entry offset to 32-bits when printing. 2002-10-29 14:50:53 +00:00
atatat 2bc4364804 Provides better error messages from the symbol lookups (printing
merely "  == 1" is just *not* helpful).

Note which symbols were missing (better for bug reports, if anyone
files one :).

Make the kernel submap symbols optional (sparc, sparc64, most powerpc,
and the sh3 ports seem not to have a phys_map -- problem noted by
myself yesterday).

Oh, and a little misc lint cleanup while I'm here.
2002-10-17 17:18:34 +00:00
atatat 9bc250be61 Print the contents of the aref (it's small and MI -- MD code here
would be horrific).

Handle the new VM_MAP_DYING flag (and adjust the VM_MAP_TOPDOWN bit).

Check to see if 0, 1, and 2 are properly "open" and try to "adjust" if
they're not.  Emit no warnings or errors here.
2002-10-12 03:08:27 +00:00
atatat 7266746efe Provide names for the map and submaps when doing recursive verbose
ddb-style output.
2002-09-19 02:43:51 +00:00
atatat 4d2c9bf2c0 Make error messages a little more informative. Add -R option to
recurse into submaps (a kernel thing) as suggested by Chuck Cranor,
with the output from these entries indented.  Clean up and rework code
slightly, to make the recursion task much easier.  Also, add a note to
the BUGS section in the man page thats mentions that stuff "just won't
work right" unless pmap is reading from the proper kernel.
2002-09-17 19:54:28 +00:00
atatat ba9dd2c172 Add verbose support to the -l output, tweak verbose support for -d
output, and tweak the man page (running pmap(1) vs. the kernel_map can
have a *very* visible effect).
2002-09-13 15:32:49 +00:00
atatat 0fb6b57457 Unterminated comment. Grr... 2002-09-01 20:37:28 +00:00
atatat 692fefdd0e Move pmap(1) to /usr/bin (from /usr/sbin) where it belongs. 2002-09-01 20:32:43 +00:00