Loading cmds/dumpstate/dumpstate.c +2 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,8 @@ static void dumpstate() { run_command("LIST OF OPEN FILES", 10, "su", "root", "lsof", NULL); for_each_pid(do_showmap, "SMAPS OF ALL PROCESSES"); #ifdef BOARD_HAS_DUMPSTATE printf("========================================================\n"); printf("== Board\n"); Loading cmds/dumpstate/dumpstate.h +3 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,9 @@ void for_each_pid(void (*func)(int, const char *), const char *header); /* Displays a blocked processes in-kernel wait channel */ void show_wchan(int pid, const char *name); /* Runs "showmap" for a process */ void do_showmap(int pid, const char *name); /* Play a sound via Stagefright */ void play_sound(const char* path); Loading cmds/dumpstate/utils.c +9 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,15 @@ out_close: return; } void do_showmap(int pid, const char *name) { char title[255]; char arg[255]; sprintf(title, "SHOW MAP %d (%s)", pid, name); sprintf(arg, "%d", pid); run_command(title, 10, "su", "root", "showmap", arg, NULL); } /* prints the contents of a file */ int dump_file(const char *title, const char* path) { char buffer[32768]; Loading Loading
cmds/dumpstate/dumpstate.c +2 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,8 @@ static void dumpstate() { run_command("LIST OF OPEN FILES", 10, "su", "root", "lsof", NULL); for_each_pid(do_showmap, "SMAPS OF ALL PROCESSES"); #ifdef BOARD_HAS_DUMPSTATE printf("========================================================\n"); printf("== Board\n"); Loading
cmds/dumpstate/dumpstate.h +3 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,9 @@ void for_each_pid(void (*func)(int, const char *), const char *header); /* Displays a blocked processes in-kernel wait channel */ void show_wchan(int pid, const char *name); /* Runs "showmap" for a process */ void do_showmap(int pid, const char *name); /* Play a sound via Stagefright */ void play_sound(const char* path); Loading
cmds/dumpstate/utils.c +9 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,15 @@ out_close: return; } void do_showmap(int pid, const char *name) { char title[255]; char arg[255]; sprintf(title, "SHOW MAP %d (%s)", pid, name); sprintf(arg, "%d", pid); run_command(title, 10, "su", "root", "showmap", arg, NULL); } /* prints the contents of a file */ int dump_file(const char *title, const char* path) { char buffer[32768]; Loading