diff options
author | Theron <tspiegl@gmail.com> | 2021-05-05 21:07:30 -0500 |
---|---|---|
committer | Theron <tspiegl@gmail.com> | 2021-05-05 21:07:30 -0500 |
commit | e41661906310184be9f49de4292091b91fa49835 (patch) | |
tree | 3c8030b78bb3970468084f3444de919a9baf2a70 | |
parent | e4a65824c878ac009499924480cc48bb5be55481 (diff) |
android
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | src/attach.c | 3 |
2 files changed, 5 insertions, 1 deletions
@@ -20,6 +20,9 @@ all: bin/whatfiles bin/whatfiles: $(SOURCES) $(CC) $(CFLAGS) -o $@ $(SOURCES) src/$(ARCH_DIR)/registers.c +bin/androidWhatfiles: $(SOURCES) + ~/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 $(CFLAGS) -o $@ $(SOURCES) src/arm64/registers.c + # utils install: diff --git a/src/attach.c b/src/attach.c index 1846288..5c9c647 100644 --- a/src/attach.c +++ b/src/attach.c @@ -36,12 +36,13 @@ char read_status(pid_t pid) FILE *h_status = fopen(path, "rb"); if (!h_status) return 0; read_file(str, 4096, h_status); + DEBUG("PROC FILE\n%s", str->data); int err; regmatch_t pmatch[2]; err = regexec(®ex, str->data, 2, pmatch, 0); if (err) { - DEBUG("failed to find regex match in /proc/%d/status file\n", pid); + DEBUG("failed to find regex match in /proc/%d/status file: 0x%x\n", pid, err); } else { c = *(str->data + pmatch[1].rm_so); } |