Skip to content

Instantly share code, notes, and snippets.

@mrpossoms
Created October 7, 2014 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrpossoms/45410132aa83933459f5 to your computer and use it in GitHub Desktop.
Save mrpossoms/45410132aa83933459f5 to your computer and use it in GitHub Desktop.
Mem dump
void __dump(void* buf, int len){
int i = 0;
for(i = 0; i < len; i++){
char str[16];
sprintf(str, "%02x ", ((char*)buf)[i] & 0xff);
write(1, str, strlen(str));
}write(1, "\n", 1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment