---
name: "hexdump"
section: "3debug"
platform: "linux"
package: "libdebug0-dev"
version: "0.5.3-8+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/hexdump/3debug"
---

# hexdump(3debug)

dump binary data in hex/ascii format

## NAME

hexdump - dump binary data in hex/ascii format

## LIBRARIES

Debug Library (-ldebug)

## SYNOPSIS

```
#include <debug/log.h>
#include <debug/hex.h>

void hexdump(const void *ptr, size_t size);
```

## DESCRIPTION

**hexdump()** prints *size* bytes, starting at *ptr* in memory, using the debug log system.

The output consists of 6 columns. The first column contains the address of the row (in bytes). Columns 2 to 5 contain the characters in the row represented as hexadecimal bytes. The last column contains the bytes as printable characters. If a character is not printable it is replaced by a dot.

## NOTES

None of the libdebug routines are thread-safe. I'm not planning to change this either! For more information, please see http://threading.2038bug.com/

## SEE ALSO

[log\_open(3)](/log_open/3.md)

## AUTHOR

Written by Abraham vd Merwe \<abz@blio.com\>
