25 #ifndef SPA_DEBUG_MEM_H
26 #define SPA_DEBUG_MEM_H
40 #define spa_debug(...) ({ fprintf(stderr, __VA_ARGS__);fputc('\n', stderr); })
43 static inline int spa_debug_mem(
int indent,
const void *data,
size_t size)
45 const uint8_t *t = (
const uint8_t*)data;
50 for (i = 0; i < size; i++) {
52 pos = sprintf(buffer,
"%p: ", &t[i]);
53 pos += sprintf(buffer + pos,
"%02x ", t[i]);
54 if (i % 16 == 15 || i == size - 1) {
55 spa_debug(
"%*s" "%s", indent,
"", buffer);
#define spa_debug(...)
Definition: mem.h:45
static int spa_debug_mem(int indent, const void *data, size_t size)
Definition: mem.h:48