Skip to content

Instantly share code, notes, and snippets.

@hanshoglund
Created January 15, 2013 20:32
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hanshoglund/4541770 to your computer and use it in GitHub Desktop.
Save hanshoglund/4541770 to your computer and use it in GitHub Desktop.
C memdump
void memdump(void* s, size_t n)
{
for (size_t i = 0; i < n; ++i)
printf("%x ", *((unsigned char*) (s + i)) );
printf("\n");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment