31 lines
732 B
C++
Raw Normal View History

2022-11-26 22:45:45 +08:00
#pragma once
#include <sys/types.h>
2022-11-27 00:43:46 +08:00
#include <string>
2022-11-26 22:45:45 +08:00
#include <string_view>
namespace lsplt {
inline namespace v1 {
2022-11-27 00:43:46 +08:00
struct MapInfo {
uintptr_t start;
uintptr_t end;
uint8_t perm;
bool is_private;
dev_t dev;
ino_t inode;
std::string path;
2022-11-27 00:59:56 +08:00
[[maybe_unused, gnu::visibility("default")]] static std::vector<MapInfo> Scan();
2022-11-27 00:43:46 +08:00
};
2022-11-27 00:29:32 +08:00
[[maybe_unused, gnu::visibility("default")]] bool RegisterHook(ino_t ino, std::string_view symbol,
void *callback, void **backup);
2022-11-26 22:45:45 +08:00
2022-11-27 00:29:32 +08:00
[[maybe_unused, gnu::visibility("default")]] bool CommitHook();
2022-11-26 22:45:45 +08:00
2022-11-27 00:29:32 +08:00
[[maybe_unused, gnu::visibility("default")]] bool InvalidateBackup();
2022-11-26 22:45:45 +08:00
} // namespace v1
} // namespace lsplt