DragonFly BSD
DragonFly commits List (threaded) for 2006-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/test/debug kwrite.c


From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Tue, 10 Jan 2006 12:26:31 +0100

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   / \



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]