Have been feeling rather unwell for the past couple of days, so I decided,
while I feel like death warmed up, how could hacking at Valgrind possibly
make it worse?
I took Tilman Sauerbeck's extended
version of Dave Airlie's valgrind-mmt, and cleaned up a couple of minor
bits -- changed the offset to be specified in hex, added support for
repetitions (e.g. 'repeated 255 times', instead of the same line 256 times
over), and also added support for the in*/out* family on AMD64, which was
quite entertaining as I've not really touched either assembly or Valgrind
before. Got it working in the end, despite libVEX's best efforts to
frustrate me, and ended up feeling slightly better as well. Huzzah.
Anyway, 'sudo valgrind --tool=mmt --offset=0xc1000000[0] /usr/bin/Xorg
:0 -ac > x.log 2>&1' will trap all MMIO accesses made by X or
its VBIOS, provided you run the BIOS through x86emu instead of lrmi.
Postscript: spent a few minutes after writing this trying to figure out if
there was anything I should've said, and didn't. Now, hours later, I realise
there was one minor detail omitted: the
URL. gitweb is just there, and the anonymous clone URL is
git://people.freedesktop.org/~daniels/valgrind.
[0]: Get the base address with lspci -v. Your video card should have two
PCI regions, of which one is big (your main video memory), and the other
one is 32 or 64kB (the MMIO space, i.e. the bit you want).
[About
Daniel StoneX ninja
Melbourne, AU
Planets
Planet freedesktop.orgPlanet GNOME
Moon Debian
Organisations
challengechildren's cancer centre, rch
ecoles sans frontières
amnesty international
engineers without borders australia
ikando
australian greens
australian republican movement
Links
my websitemy photos at flickr
x.org
linux.conf.au 2008
eat.fi
Open Source Food
Categories
/ (125)site/ (3)
tech/ (119)
debian/ (10)
fdo/ (15)
kde/ (1)
lca/ (1)
ubuntu/ (10)
x/ (49)
xds/ (3)
travel/ (3)
guadec2007/ (1)
Archives
2008-Aug2008-Jul
2008-Jun
2008-May
2008-Feb
2007-Oct
2007-Sep
2007-Jul
2007-Jun
2007-May
2007-Mar
2007-Jan
2006-Nov
2006-Aug
2006-Jun
2006-May
2006-Apr
2006-Mar
2006-Feb
2006-Jan
2005-Dec
2005-Nov
2005-Oct
2005-Sep
2005-Aug
2005-Jul
2005-Jun
2005-Apr
2005-Mar
2005-Feb
2005-Jan
2004-Dec
2004-Nov
2004-Oct
2004-Sep
2004-Jun
2004-May
2004-Apr
2004-Mar
2004-Feb
2004-Jan
Calendar
| < | March 2007 | > | ||||
| Su | Mo | Tu | We | Th | Fr | Sa |
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |