printf utility i use to debug memory related c softwares.
this utility uses escape sequence for coloring, use it with modern terminal.
- make highlight tokens (highlight specific data)
- print ascii section option
code usage:
#include "hexdump.h"
int main(int argc, char *argv[])
{
const char hello[] = "Hello World !";
char *mem = malloc(512);
if (NULL != mem){
strcpy(mem + 10, hello);
hex_dump_highlight(mem, 512, 10, sizeof(hello));
free(mem);
}
}