68 void *callback,
void **backup);
103 [[maybe_unused, gnu::visibility(
"default")]]
bool RegisterHook(dev_t dev, ino_t inode, uintptr_t offset,
105 void *callback,
void **backup);
113 [[maybe_unused, gnu::visibility(
"default")]]
bool CommitHook();
bool CommitHook()
Commit all registered hooks.
bool InvalidateBackup()
Invalidate backup memory regions Normally LSPlt will backup the hooked memory region and do hook on a...
bool RegisterHook(dev_t dev, ino_t inode, std::string_view symbol, void *callback, void **backup)
Register a hook to a function by inode. For so within an archive, you should use #RegisterHook(ino_t,...
An entry that describes a line in /proc/self/maps. You can obtain a list of these entries by calling ...
uintptr_t start
The start address of the memory region.
bool is_private
Whether the memory region is private.
uintptr_t end
The end address of the memory region.
uint8_t perms
The permissions of the memory region. This is a bit mask of the following values:
ino_t inode
The inode number of the memory region.
uintptr_t offset
The offset of the memory region.
dev_t dev
The device number of the memory region. Major can be obtained by #major() Minor can be obtained by #m...
std::string path
The path of the memory region.
static std::vector< MapInfo > Scan(std::string_view pid="self")
Scans /proc/self/maps and returns a list of MapInfo entries. This is useful to find out the inode of ...