From 5369407082db53b68a1100e7b5391a1e9c36e621 Mon Sep 17 00:00:00 2001 From: Orfeas <38209077+0xfea5@users.noreply.github.com> Date: Tue, 16 Apr 2024 00:19:57 +0300 Subject: Parse /proc/pid/maps --- src/main.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 1d23902..e255ec5 100644 --- a/src/main.c +++ b/src/main.c @@ -1,17 +1,12 @@ +#include +#include #include #include #include #include #include - -#define ERROR(...) \ - do { \ - fprintf(stderr, __VA_ARGS__); \ - exit(1); \ - } while (0) - -#define LOG(...) \ - fprintf(stderr, __VA_ARGS__) +#include "util.h" +#include "vm.h" int main(int argc, char *argv[]) { @@ -29,7 +24,7 @@ int main(int argc, char *argv[]) LOG("Attached to process %d\n", pid); /* Do stuff ... */ - sleep(5); + parse_vmmap(pid); ptrace(PTRACE_DETACH, pid, NULL, NULL); LOG("Detached from process %d\n", pid); -- cgit v1.2.3