MemoryAccessor 1
A command-line front-end for exploring virtual memory of a linux process by accessing /proc/PID/mem file.
|
A class for printing data in a readable format. More...
#include <hexviewer.h>
Public Member Functions | |
void | PrintHex (std::ostream *stream_p, const char *s, size_t size, size_t addr, bool show_hex=false) const noexcept |
Print data in readable format. | |
A class for printing data in a readable format.
This class provides an opportunity to print in readable format any array of char (bytes) to any ostream, optionally showing the hexadecimal values of bytes.
|
noexcept |
Print data in readable format.
[in,out] | stream_p | std::ostream to which output should be printed. |
[in] | s | Array of char with data to be processed. |
[in] | size | Size of the array of char. |
[in] | addr | Start address to print to output. |
[in] | show_hex | To show hex values of bytes or not. |
Print data line be line replacing non-printable characters by '.'. If show_hex is true, hex values are shown. Also, address provided in parameter "address" is printed in hex with offset in each line. The width of each line is base_width_ multiplied by 2 in power as much as screen width can contain when show_hex is true, otherwise width is additionally multiplied by 4.