HEXDUMP(3debug)

πŸ’– NAME πŸ’–

hexdump β€” dump binary data in hex/ascii format, bestie πŸ’…


πŸ“š LIBRARIES πŸ“š

Debug Library β€” link it with -ldebug and you're soooo set 🫢


✨ SYNOPSIS ✨

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

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

πŸ” DESCRIPTION πŸ”

okay so hexdump() prints size bytes, starting at ptr in memory, and it does it through the debug log system. literally the glow-up your raw memory always deserved 🌸

the output is giving 6 columns, periodt:

  • column 1 β€” the address of the row (in bytes) πŸ“
  • columns 2 to 5 β€” the characters in the row represented as hexadecimal bytes πŸ”’
  • the last column β€” the bytes as printable characters πŸ–¨οΈ

and if a character isn't printable?? it gets replaced by a dot . β€” no cap, that's just the vibe check it does πŸ™ˆ


⚠️ NOTES ⚠️

none of the libdebug routines are thread-safe. and the author is not planning to change this either!! 😭 iconic honestly. for more information, please see http://threading.2038bug.com/

πŸ‘€ SEE ALSO πŸ‘€


πŸ‘‘ AUTHOR πŸ‘‘

written by Abraham vd Merwe <abz@blio.com> πŸ’Œ


this page came from the Unix manual, dated August 2004 β€” yes bestie, we're serving vintage 3debug energy and it still ate πŸ’…βœ¨

πŸ“¦ where this page comes from