|
MemoryAccessor 1
A command-line front-end for exploring virtual memory of a linux process by accessing /proc/PID/mem file.
|
A class to store the information of a memory segment. More...
#include <segmentinfo.h>
Public Member Functions | |
| uint8_t | DecodePermissions (const std::string &permissions) noexcept |
| Get permissions stored to mode_ field from std::string. | |
| std::string | EncodePermissions () const noexcept |
| Get permissions stored as std::string processed from the mode_ field. | |
Public Attributes | |
| size_t | start_ {0} |
| Start address. | |
| size_t | end_ {0} |
| End address (first address that does not belong to the segment) | |
| size_t | offset_ {0} |
| (e.g., executable from ROM) | |
| uint8_t | mode_ {0} |
| is 1 (private - shared) | |
| uint32_t | major_id_ {0} |
| Major ID. | |
| uint32_t | minor_id_ {0} |
| Minor ID. | |
| size_t | inode_id_ {0} |
| ROM) | |
| std::string | path_ |
| Path or name. | |
A class to store the information of a memory segment.
This class stores the information of one memory segment in a way it is given in /proc/PID/maps file. It uses its own style of storing the permissions though.
|
noexcept |
Get permissions stored to mode_ field from std::string.
| [in] | permissions | Permissions stored as std::string, for example, "rwxp". Some additional characters after are not prohibited. |
Store permissions of a memory segment from std::string to mode_ field. In case of an error permissions are not stored and 1 is returned.
|
noexcept |
Get permissions stored as std::string processed from the mode_ field.
Process permissions of a memory segment from the mode_ field to std::string.
| size_t SegmentInfo::inode_id_ {0} |
ROM)
Inode ID if it is a file mapping (e.g., executable from
| uint8_t SegmentInfo::mode_ {0} |
is 1 (private - shared)
Permissions, are stored as 0000rwx(p/s), where p is 0, s
| size_t SegmentInfo::offset_ {0} |
(e.g., executable from ROM)
Offset from the start of the file if it is a file mapping