Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8eb25d55 authored by Colin Cross's avatar Colin Cross
Browse files

dumpstate: fix dumping traces for vm processes on 64-bit

dumpstate was not dumping any stack traces for vm processes because
it was failing the string compare for /system/bin/app_process.
64-bit devices use app_process32 and app_process64 instead of
app_process, and zygote64 alongside zygote.  Change the string
matching to be prefix matching.

Change-Id: I6970e1b1fedfcd601f8db6af62852422fcb71d59
parent 721fdd3a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -526,7 +526,7 @@ const char *dump_traces() {
        }
        data[len] = '\0';

        if (!strcmp(data, "/system/bin/app_process")) {
        if (!strncmp(data, "/system/bin/app_process", strlen("/system/bin/app_process"))) {
            /* skip zygote -- it won't dump its stack anyway */
            snprintf(path, sizeof(path), "/proc/%d/cmdline", pid);
            int fd = open(path, O_RDONLY);
@@ -536,7 +536,7 @@ const char *dump_traces() {
                continue;
            }
            data[len] = '\0';
            if (!strcmp(data, "zygote")) {
            if (!strncmp(data, "zygote", strlen("zygote"))) {
                continue;
            }