FreeBSD/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c
/*
 * Dump the contents of memory as a fixed-size integer in hex.
 */
Dump the contents of memory as a fixed-size integer in hex.
Dump the contents of memory as a fixed - size integer in hex .
static void
dt_print_hex(FILE *fp, caddr_t addr, size_t size)
{
	switch (size) {
	case sizeof (uint8_t):
		(void) fprintf(fp, "%#x", *(uint8_t *)addr);
		break;
	case sizeof (uint16_t):
		(void) fprintf(fp, "%#x", *(uint16_t *)addr);
		break;
	case sizeof (uint32_t):
		(void) fprintf(fp, "%#x", *(uint32_t *)addr);
		break;
	case sizeof (uint64_t):
		(void) fprintf(fp, "%#llx",
		    (unsigned long long)*(uint64_t *)addr);
		break;
	default:
		(void) fprintf(fp, "<invalid size %u>", (uint_t)size);
	}
}
static void dt_print_hex ( FILE * fp , caddr_t addr , size_t size ) { switch ( size ) { case sizeof ( uint8_t ) : ( void ) fprintf ( fp , " " , * ( uint8_t * ) addr ) ; break ; case sizeof ( uint16_t ) : ( void ) fprintf ( fp , " " , * ( uint16_t * ) addr ) ; break ; case sizeof ( uint32_t ) : ( void ) fprintf ( fp , " " , * ( uint32_t * ) addr ) ; break ; case sizeof ( uint64_t ) : ( void ) fprintf ( fp , " " , ( unsigned long long ) * ( uint64_t * ) addr ) ; break ; default : ( void ) fprintf ( fp , " " , ( uint_t ) size ) ; } }
Dump the contents of memory as a fixed-size integer in hex.
Dump the contents of memory as a fixed - size integer in hex .
/* LINTED - alignment */ /* LINTED - alignment */ /* LINTED - alignment */