libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
introvirt::HexDump Class Reference

A class for outputting formatted hex dumps. More...

#include <HexDump.hh>

Public Member Functions

void write (std::ostream &os=std::cout) const
 Write the formatted hex output.
 
 HexDump (const void *buf, std::size_t len, std::size_t start_address=0, std::string prepend="")
 Construct a new HexDump object using the given buffer.
 
 HexDump (const guest_ptr< void > &ptr, size_t len, std::string prepend="")
 Construct a HexDump object using guest memory at the specified address.
 

Detailed Description

A class for outputting formatted hex dumps.

Constructor & Destructor Documentation

◆ HexDump() [1/2]

introvirt::HexDump::HexDump ( const void *  buf,
std::size_t  len,
std::size_t  start_address = 0,
std::string  prepend = "" 
)

Construct a new HexDump object using the given buffer.

Parameters
bufThe buffer to read from
lenThe number of bytes to read
start_addressThe address to label the output data as
prependA prefix to add before each line

◆ HexDump() [2/2]

introvirt::HexDump::HexDump ( const guest_ptr< void > &  ptr,
size_t  len,
std::string  prepend = "" 
)

Construct a HexDump object using guest memory at the specified address.

Parameters
ptrThe address to read
lenThe number of bytes to read
prependA prefix to add before each line

Member Function Documentation

◆ write()

void introvirt::HexDump::write ( std::ostream &  os = std::cout) const

Write the formatted hex output.

Parameters
osThe output stream to write to

The documentation for this class was generated from the following file: