random ramblings from some random dude
diary of a window system hacker

About

Daniel Stone
X ninja
Helsinki, FI

Planets

Planet freedesktop.org
Planet GNOME
Moon Debian

Organisations

challenge
children's cancer centre, rch
ecoles sans frontières
amnesty international
engineers without borders australia
ikando
australian greens
australian republican movement

Links

my website
my photos at flickr
x.org
linux.conf.au 2008
eat.fi
Open Source Food

Categories

/ (122)
  site/ (3)
  tech/ (116)
    debian/ (10)
    fdo/ (15)
    kde/ (1)
    lca/ (1)
    ubuntu/ (10)
    x/ (47)
      xds/ (2)
  travel/ (3)
    guadec2007/ (1)


Archives

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 >
SuMoTuWeThFrSa
     1 2 3
4 5 6 7 8 910
11121314151617
18192021222324
25262728293031

Mon, 12 Mar 2007

valgrinding x

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).
[22:39 | /tech/x | # | soundproof productions - beyond the milkyway (120bpm refix) | home ]

Sun, 11 Mar 2007

sigh. just, sigh.

On behalf of the rest of Planet Ubuntu, I'd like to apologise for Stephan Hermann. Most everyone else there isn't half as obnoxious, so please ignore that entry.
[21:15 | /tech/ubuntu | # | | home ]