cvs commit: src/test/debug kwrite.c

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Tue Jan 10 03:28:34 PST 2006


David Xu wrote:
Simon Schubert wrote:

corecode    2006/01/09 07:05:45 PST

DragonFly src repository

  Added files:
    test/debug           kwrite.c   Log:
  Add kwrite, a tool to inspect and write kernel memory
Cool. :-)
yea, useful to correct refcounts or stuff :)

to find out the address to write to, do something like this

# gdb -k /kernel /dev/mem
. ..
(kgdb) p kernelvar
$1 = 5
(kgdb) set kernelvar = 6
can not access 0xc0340b00, kvm_write: Bad file descriptor
can not access 0xc0340b00, kvm_write: Bad file descriptor
Error accessing memory address 0xc0340b00: Bad file descriptor.
(kgdb) ^Z
# kwrite 0xc0340b00/4
0xc0340b00 05
0xc0340b01 00
0xc0340b02 00
0xc0340b03 00
# kwrite 0xc0340b00 6
0xc0340b00 05 -> 06
Maybe somebody wants to add kvm_nlist() support...

--
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \




More information about the Commits mailing list