Since I often work on graphics code, one of the things I frequently want to do while debugging is take a chunk of memory and view it as an image. No standard debugger seems to do this, which is surprising given how useful it is. I’ve made do with other tools in the past — there’s a great debugging image viewer somewhere for win32 (I can’t find it via google this time around) that lets you attach to a process and manually put in an address, dimensions, etc. to grab the data from the process and view it. It’s somewhat buggy though, and hasn’t been udpated in a while. There’s also the image debugger, which is handy, but requires you to link it into your program.
So, I finally wrote the (very simple) debug extension I wish I’d had. You can find the source for imext here (it’s a hg repo), and a binary DLL built for x86 here. Rename it to imext.dll and drop it alongside your x86 WinDbg. Use “!imext.help” to get some basic instructions. It’s pretty rough code and only does exactly what I needed yesterday, but it can become more useful pretty quickly. There are some weird bugs with WinDbg’s expression evaluators that make it difficult to use with actual expressions; passing addresses directly works better. Also remember that WinDbg’s default expression evaluator is MASM, not C++ — the main thing is that this means that any bare numbers are interpreted as hex (use 0n123 to get decimal).
I’ll probably extend this quite a bit over time, including teaching it about Mozilla-specific things like gfxImageSurfaces.