Hexdumping function?

Benjamin Cutler cutler at cs.colostate.edu
Fri Apr 15 22:51:23 CDT 2005


I'm writing a conformance test for my implementation of powrprof.dll
that I've been working on, and something I'd like to do in the test is
dump the contents of some structs to the screen without trying to make
it pretty. I cobbled together the following function, but I'd like to
know if there's something like this already so I don't reinvent the wheel:

void hexdump(void *p, int len) {
        int i;
        long *src = (long *)p;
        len /= 4;
        for(i = 0; i < len; i++) {
                printf("%08lX", src[i]);
        }
}




More information about the wine-devel mailing list